Changeset 0050a5f for src


Ignore:
Timestamp:
Feb 28, 2019, 10:59:47 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
17a1b21, 874ffa4
Parents:
f56c32e (diff), 0633cf2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

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

Location:
src
Files:
4 added
1 deleted
24 edited
1 moved

Legend:

Unmodified
Added
Removed
  • src/CodeGen/module.mk

    rf56c32e r0050a5f  
    1818#       ArgTweak/Mutate.cc
    1919
    20 SRC +=  CodeGen/Generate.cc \
     20SRC_CODEGEN = \
    2121        CodeGen/CodeGenerator.cc \
     22        CodeGen/FixMain.cc \
    2223        CodeGen/GenType.cc \
    23         CodeGen/FixNames.cc \
    24         CodeGen/FixMain.cc \
    2524        CodeGen/OperatorTable.cc
     25
     26
     27SRC += $(SRC_CODEGEN) CodeGen/Generate.cc CodeGen/FixNames.cc
     28SRCDEMANGLE += $(SRC_CODEGEN)
  • src/Common/Stats/Heap.h

    rf56c32e r0050a5f  
    1616#pragma once
    1717
    18 namespace HeapStats {
    19         void newPass( const char * const name );
    20         void printStats();
     18namespace Stats {
     19        namespace Heap {
     20                void newPass( const char * const name );
     21                void print();
     22        }
    2123}
  • src/Common/module.mk

    rf56c32e r0050a5f  
    1515###############################################################################
    1616
    17 SRC += Common/SemanticError.cc \
    18        Common/UniqueName.cc \
    19        Common/DebugMalloc.cc \
    20        Common/Assert.cc \
    21        Common/Heap.cc \
    22        Common/Eval.cc
     17SRC_COMMON = \
     18      Common/Assert.cc \
     19      Common/Stats/Heap.cc \
     20      Common/Stats/Counter.cc \
     21      Common/Eval.cc \
     22      Common/SemanticError.cc \
     23      Common/UniqueName.cc
     24
     25SRC += $(SRC_COMMON) Common/DebugMalloc.cc
     26SRCDEMANGLE += $(SRC_COMMON)
  • src/CompilationState.cc

    rf56c32e r0050a5f  
    3838        codegenp = false,
    3939        prettycodegenp = false,
    40         linemarks = false;
     40        linemarks = false,
     41        stats_heap = false,
     42        stats_counters = false;
    4143
    4244// Local Variables: //
  • src/CompilationState.h

    rf56c32e r0050a5f  
    3939        codegenp,
    4040        prettycodegenp,
    41         linemarks;
     41        linemarks,
     42        stats_heap,
     43        stats_counters;
    4244
    4345// is the compiler building prelude or libcfa?
  • src/Concurrency/module.mk

    rf56c32e r0050a5f  
    1515###############################################################################
    1616
    17 SRC += Concurrency/Keywords.cc \
    18        Concurrency/Waitfor.cc
     17SRC += Concurrency/Keywords.cc Concurrency/Waitfor.cc
     18SRCDEMANGLE += Concurrency/Keywords.cc
    1919
  • src/ControlStruct/module.mk

    rf56c32e r0050a5f  
    1515###############################################################################
    1616
    17 SRC +=  ControlStruct/LabelGenerator.cc \
     17SRC_CONTROLSTRUCT = \
     18        ControlStruct/ForExprMutator.cc \
    1819        ControlStruct/LabelFixer.cc \
     20        ControlStruct/LabelGenerator.cc \
    1921        ControlStruct/MLEMutator.cc \
    20         ControlStruct/Mutate.cc \
    21         ControlStruct/ForExprMutator.cc \
    22         ControlStruct/ExceptTranslate.cc
     22        ControlStruct/Mutate.cc
     23
     24SRC += $(SRC_CONTROLSTRUCT) ControlStruct/ExceptTranslate.cc
     25SRCDEMANGLE += $(SRC_CONTROLSTRUCT)
     26
  • src/GenPoly/module.mk

    rf56c32e r0050a5f  
    2222       GenPoly/FindFunction.cc \
    2323       GenPoly/InstantiateGeneric.cc
     24
     25SRCDEMANGLE += GenPoly/GenPoly.cc GenPoly/Lvalue.cc
     26
  • src/InitTweak/module.mk

    rf56c32e r0050a5f  
    2020        InitTweak/InitTweak.cc
    2121
     22SRCDEMANGLE += InitTweak/GenInit.cc \
     23        InitTweak/InitTweak.cc
     24
  • src/Makefile.am

    rf56c32e r0050a5f  
    2020
    2121SRC = main.cc \
    22                         MakeLibCfa.cc \
    23                         CompilationState.cc
     22      MakeLibCfa.cc \
     23      CompilationState.cc
     24
     25SRCDEMANGLE = CompilationState.cc
    2426
    2527MAINTAINERCLEANFILES =
     
    6062demangler_SOURCES = SymTab/demangler.cc
    6163
    62 demangler_LDADD = libdemangle.a                 # yywrap
     64demangler_LDADD = libdemangle.a -ldl                    # yywrap
    6365
    6466noinst_LIBRARIES = libdemangle.a
    65 libdemangle_a_SOURCES = SymTab/Demangle.cc SymTab/ManglerCommon.cc \
    66         SynTree/Type.cc \
    67         SynTree/VoidType.cc \
    68         SynTree/BasicType.cc \
    69         SynTree/PointerType.cc \
    70         SynTree/ArrayType.cc \
    71         SynTree/ReferenceType.cc \
    72         SynTree/FunctionType.cc \
    73         SynTree/ReferenceToType.cc \
    74         SynTree/TupleType.cc \
    75         SynTree/TypeofType.cc \
    76         SynTree/AttrType.cc \
    77         SynTree/VarArgsType.cc \
    78         SynTree/ZeroOneType.cc \
    79         SynTree/Constant.cc \
    80         SynTree/Expression.cc \
    81         SynTree/TupleExpr.cc \
    82         SynTree/CommaExpr.cc \
    83         SynTree/TypeExpr.cc \
    84         SynTree/ApplicationExpr.cc \
    85         SynTree/AddressExpr.cc \
    86         SynTree/Statement.cc \
    87         SynTree/CompoundStmt.cc \
    88         SynTree/DeclStmt.cc \
    89         SynTree/Declaration.cc \
    90         SynTree/DeclarationWithType.cc \
    91         SynTree/ObjectDecl.cc \
    92         SynTree/FunctionDecl.cc \
    93         SynTree/AggregateDecl.cc \
    94         SynTree/NamedTypeDecl.cc \
    95         SynTree/TypeDecl.cc \
    96         SynTree/Initializer.cc \
    97         SynTree/TypeSubstitution.cc \
    98         SynTree/Attribute.cc \
    99         SynTree/DeclReplacer.cc \
    100         CompilationState.cc \
    101         CodeGen/CodeGenerator.cc \
    102         CodeGen/FixMain.cc \
    103         CodeGen/GenType.cc \
    104         CodeGen/OperatorTable.cc \
    105         Common/Assert.cc \
    106         Common/Eval.cc \
    107         Common/SemanticError.cc \
    108         Common/UniqueName.cc \
    109         Concurrency/Keywords.cc \
    110         ControlStruct/ForExprMutator.cc \
    111         ControlStruct/LabelFixer.cc \
    112         ControlStruct/LabelGenerator.cc \
    113         ControlStruct/MLEMutator.cc \
    114         ControlStruct/Mutate.cc \
    115         GenPoly/GenPoly.cc \
    116         GenPoly/Lvalue.cc \
    117         InitTweak/GenInit.cc \
    118         InitTweak/InitTweak.cc \
    119         Parser/LinkageSpec.cc \
    120         ResolvExpr/AdjustExprType.cc \
    121         ResolvExpr/Alternative.cc \
    122         ResolvExpr/AlternativeFinder.cc \
    123         ResolvExpr/ExplodedActual.cc \
    124         ResolvExpr/CastCost.cc \
    125         ResolvExpr/CommonType.cc \
    126         ResolvExpr/ConversionCost.cc \
    127         ResolvExpr/CurrentObject.cc \
    128         ResolvExpr/FindOpenVars.cc \
    129         ResolvExpr/Occurs.cc \
    130         ResolvExpr/PolyCost.cc \
    131         ResolvExpr/PtrsAssignable.cc \
    132         ResolvExpr/PtrsCastable.cc \
    133         ResolvExpr/RenameVars.cc \
    134         ResolvExpr/ResolveAssertions.cc \
    135         ResolvExpr/Resolver.cc \
    136         ResolvExpr/ResolveTypeof.cc \
    137         ResolvExpr/SpecCost.cc \
    138         ResolvExpr/TypeEnvironment.cc \
    139         ResolvExpr/Unify.cc \
    140         SymTab/Autogen.cc \
    141         SymTab/FixFunction.cc \
    142         SymTab/Indexer.cc \
    143         SymTab/Mangler.cc \
    144         SymTab/Validate.cc \
    145         Tuples/Explode.cc \
    146         Tuples/TupleAssignment.cc \
    147         Tuples/TupleExpansion.cc \
    148         Validate/HandleAttributes.cc
     67libdemangle_a_SOURCES = $(SRCDEMANGLE)
    14968
    15069MAINTAINERCLEANFILES += ${libdir}/${notdir ${cfa_cpplib_PROGRAMS}}
  • src/Makefile.in

    rf56c32e r0050a5f  
    162162libdemangle_a_LIBADD =
    163163am__dirstamp = $(am__leading_dot)dirstamp
    164 am_libdemangle_a_OBJECTS = SymTab/Demangle.$(OBJEXT) \
    165         SymTab/ManglerCommon.$(OBJEXT) SynTree/Type.$(OBJEXT) \
    166         SynTree/VoidType.$(OBJEXT) SynTree/BasicType.$(OBJEXT) \
    167         SynTree/PointerType.$(OBJEXT) SynTree/ArrayType.$(OBJEXT) \
    168         SynTree/ReferenceType.$(OBJEXT) SynTree/FunctionType.$(OBJEXT) \
    169         SynTree/ReferenceToType.$(OBJEXT) SynTree/TupleType.$(OBJEXT) \
    170         SynTree/TypeofType.$(OBJEXT) SynTree/AttrType.$(OBJEXT) \
    171         SynTree/VarArgsType.$(OBJEXT) SynTree/ZeroOneType.$(OBJEXT) \
    172         SynTree/Constant.$(OBJEXT) SynTree/Expression.$(OBJEXT) \
    173         SynTree/TupleExpr.$(OBJEXT) SynTree/CommaExpr.$(OBJEXT) \
    174         SynTree/TypeExpr.$(OBJEXT) SynTree/ApplicationExpr.$(OBJEXT) \
    175         SynTree/AddressExpr.$(OBJEXT) SynTree/Statement.$(OBJEXT) \
    176         SynTree/CompoundStmt.$(OBJEXT) SynTree/DeclStmt.$(OBJEXT) \
    177         SynTree/Declaration.$(OBJEXT) \
    178         SynTree/DeclarationWithType.$(OBJEXT) \
    179         SynTree/ObjectDecl.$(OBJEXT) SynTree/FunctionDecl.$(OBJEXT) \
    180         SynTree/AggregateDecl.$(OBJEXT) \
    181         SynTree/NamedTypeDecl.$(OBJEXT) SynTree/TypeDecl.$(OBJEXT) \
    182         SynTree/Initializer.$(OBJEXT) \
    183         SynTree/TypeSubstitution.$(OBJEXT) SynTree/Attribute.$(OBJEXT) \
    184         SynTree/DeclReplacer.$(OBJEXT) CompilationState.$(OBJEXT) \
    185         CodeGen/CodeGenerator.$(OBJEXT) CodeGen/FixMain.$(OBJEXT) \
    186         CodeGen/GenType.$(OBJEXT) CodeGen/OperatorTable.$(OBJEXT) \
    187         Common/Assert.$(OBJEXT) Common/Eval.$(OBJEXT) \
    188         Common/SemanticError.$(OBJEXT) Common/UniqueName.$(OBJEXT) \
    189         Concurrency/Keywords.$(OBJEXT) \
    190         ControlStruct/ForExprMutator.$(OBJEXT) \
     164am__objects_1 = CodeGen/CodeGenerator.$(OBJEXT) \
     165        CodeGen/FixMain.$(OBJEXT) CodeGen/GenType.$(OBJEXT) \
     166        CodeGen/OperatorTable.$(OBJEXT)
     167am__objects_2 = Common/Assert.$(OBJEXT) Common/Stats/Heap.$(OBJEXT) \
     168        Common/Stats/Counter.$(OBJEXT) Common/Eval.$(OBJEXT) \
     169        Common/SemanticError.$(OBJEXT) Common/UniqueName.$(OBJEXT)
     170am__objects_3 = ControlStruct/ForExprMutator.$(OBJEXT) \
    191171        ControlStruct/LabelFixer.$(OBJEXT) \
    192172        ControlStruct/LabelGenerator.$(OBJEXT) \
    193173        ControlStruct/MLEMutator.$(OBJEXT) \
    194         ControlStruct/Mutate.$(OBJEXT) GenPoly/GenPoly.$(OBJEXT) \
    195         GenPoly/Lvalue.$(OBJEXT) InitTweak/GenInit.$(OBJEXT) \
    196         InitTweak/InitTweak.$(OBJEXT) Parser/LinkageSpec.$(OBJEXT) \
    197         ResolvExpr/AdjustExprType.$(OBJEXT) \
     174        ControlStruct/Mutate.$(OBJEXT)
     175am__objects_4 = ResolvExpr/AdjustExprType.$(OBJEXT) \
    198176        ResolvExpr/Alternative.$(OBJEXT) \
    199177        ResolvExpr/AlternativeFinder.$(OBJEXT) \
    200         ResolvExpr/ExplodedActual.$(OBJEXT) \
    201178        ResolvExpr/CastCost.$(OBJEXT) ResolvExpr/CommonType.$(OBJEXT) \
    202179        ResolvExpr/ConversionCost.$(OBJEXT) \
    203180        ResolvExpr/CurrentObject.$(OBJEXT) \
     181        ResolvExpr/ExplodedActual.$(OBJEXT) \
    204182        ResolvExpr/FindOpenVars.$(OBJEXT) ResolvExpr/Occurs.$(OBJEXT) \
    205183        ResolvExpr/PolyCost.$(OBJEXT) \
     
    212190        ResolvExpr/SpecCost.$(OBJEXT) \
    213191        ResolvExpr/TypeEnvironment.$(OBJEXT) \
    214         ResolvExpr/Unify.$(OBJEXT) SymTab/Autogen.$(OBJEXT) \
    215         SymTab/FixFunction.$(OBJEXT) SymTab/Indexer.$(OBJEXT) \
    216         SymTab/Mangler.$(OBJEXT) SymTab/Validate.$(OBJEXT) \
    217         Tuples/Explode.$(OBJEXT) Tuples/TupleAssignment.$(OBJEXT) \
    218         Tuples/TupleExpansion.$(OBJEXT) \
    219         Validate/HandleAttributes.$(OBJEXT)
    220 libdemangle_a_OBJECTS = $(am_libdemangle_a_OBJECTS)
    221 am__installdirs = "$(DESTDIR)$(cfa_cpplibdir)"
    222 PROGRAMS = $(cfa_cpplib_PROGRAMS)
    223 am__objects_1 = main.$(OBJEXT) MakeLibCfa.$(OBJEXT) \
    224         CompilationState.$(OBJEXT) CodeGen/Generate.$(OBJEXT) \
    225         CodeGen/CodeGenerator.$(OBJEXT) CodeGen/GenType.$(OBJEXT) \
    226         CodeGen/FixNames.$(OBJEXT) CodeGen/FixMain.$(OBJEXT) \
    227         CodeGen/OperatorTable.$(OBJEXT) CodeTools/DeclStats.$(OBJEXT) \
    228         CodeTools/ResolvProtoDump.$(OBJEXT) \
    229         CodeTools/TrackLoc.$(OBJEXT) Concurrency/Keywords.$(OBJEXT) \
    230         Concurrency/Waitfor.$(OBJEXT) Common/SemanticError.$(OBJEXT) \
    231         Common/UniqueName.$(OBJEXT) Common/DebugMalloc.$(OBJEXT) \
    232         Common/Assert.$(OBJEXT) Common/Heap.$(OBJEXT) \
    233         Common/Eval.$(OBJEXT) ControlStruct/LabelGenerator.$(OBJEXT) \
    234         ControlStruct/LabelFixer.$(OBJEXT) \
    235         ControlStruct/MLEMutator.$(OBJEXT) \
    236         ControlStruct/Mutate.$(OBJEXT) \
    237         ControlStruct/ForExprMutator.$(OBJEXT) \
    238         ControlStruct/ExceptTranslate.$(OBJEXT) GenPoly/Box.$(OBJEXT) \
    239         GenPoly/GenPoly.$(OBJEXT) GenPoly/ScrubTyVars.$(OBJEXT) \
    240         GenPoly/Lvalue.$(OBJEXT) GenPoly/Specialize.$(OBJEXT) \
    241         GenPoly/FindFunction.$(OBJEXT) \
    242         GenPoly/InstantiateGeneric.$(OBJEXT) \
    243         InitTweak/GenInit.$(OBJEXT) InitTweak/FixInit.$(OBJEXT) \
    244         InitTweak/FixGlobalInit.$(OBJEXT) \
    245         InitTweak/InitTweak.$(OBJEXT) Parser/parser.$(OBJEXT) \
    246         Parser/lex.$(OBJEXT) Parser/TypedefTable.$(OBJEXT) \
    247         Parser/ParseNode.$(OBJEXT) Parser/DeclarationNode.$(OBJEXT) \
    248         Parser/ExpressionNode.$(OBJEXT) Parser/StatementNode.$(OBJEXT) \
    249         Parser/InitializerNode.$(OBJEXT) Parser/TypeData.$(OBJEXT) \
    250         Parser/LinkageSpec.$(OBJEXT) Parser/parserutility.$(OBJEXT) \
    251         ResolvExpr/AlternativeFinder.$(OBJEXT) \
    252         ResolvExpr/Alternative.$(OBJEXT) ResolvExpr/Unify.$(OBJEXT) \
    253         ResolvExpr/PtrsAssignable.$(OBJEXT) \
    254         ResolvExpr/CommonType.$(OBJEXT) \
    255         ResolvExpr/ConversionCost.$(OBJEXT) \
    256         ResolvExpr/CastCost.$(OBJEXT) \
    257         ResolvExpr/PtrsCastable.$(OBJEXT) \
    258         ResolvExpr/AdjustExprType.$(OBJEXT) \
    259         ResolvExpr/AlternativePrinter.$(OBJEXT) \
    260         ResolvExpr/Resolver.$(OBJEXT) \
    261         ResolvExpr/ResolveTypeof.$(OBJEXT) \
    262         ResolvExpr/RenameVars.$(OBJEXT) \
    263         ResolvExpr/FindOpenVars.$(OBJEXT) \
    264         ResolvExpr/PolyCost.$(OBJEXT) ResolvExpr/Occurs.$(OBJEXT) \
    265         ResolvExpr/TypeEnvironment.$(OBJEXT) \
    266         ResolvExpr/CurrentObject.$(OBJEXT) \
    267         ResolvExpr/ExplodedActual.$(OBJEXT) \
    268         ResolvExpr/SpecCost.$(OBJEXT) \
    269         ResolvExpr/ResolveAssertions.$(OBJEXT) \
     192        ResolvExpr/Unify.$(OBJEXT)
     193am__objects_5 = SymTab/Autogen.$(OBJEXT) SymTab/FixFunction.$(OBJEXT) \
    270194        SymTab/Indexer.$(OBJEXT) SymTab/Mangler.$(OBJEXT) \
    271         SymTab/ManglerCommon.$(OBJEXT) SymTab/Validate.$(OBJEXT) \
    272         SymTab/FixFunction.$(OBJEXT) SymTab/Autogen.$(OBJEXT) \
    273         SynTree/Type.$(OBJEXT) SynTree/VoidType.$(OBJEXT) \
     195        SymTab/ManglerCommon.$(OBJEXT) SymTab/Validate.$(OBJEXT)
     196am__objects_6 = SynTree/Type.$(OBJEXT) SynTree/VoidType.$(OBJEXT) \
    274197        SynTree/BasicType.$(OBJEXT) SynTree/PointerType.$(OBJEXT) \
    275198        SynTree/ArrayType.$(OBJEXT) SynTree/ReferenceType.$(OBJEXT) \
     
    290213        SynTree/Initializer.$(OBJEXT) \
    291214        SynTree/TypeSubstitution.$(OBJEXT) SynTree/Attribute.$(OBJEXT) \
    292         SynTree/DeclReplacer.$(OBJEXT) \
     215        SynTree/DeclReplacer.$(OBJEXT)
     216am__objects_7 = CompilationState.$(OBJEXT) $(am__objects_1) \
     217        Concurrency/Keywords.$(OBJEXT) $(am__objects_2) \
     218        $(am__objects_3) GenPoly/GenPoly.$(OBJEXT) \
     219        GenPoly/Lvalue.$(OBJEXT) InitTweak/GenInit.$(OBJEXT) \
     220        InitTweak/InitTweak.$(OBJEXT) Parser/LinkageSpec.$(OBJEXT) \
     221        $(am__objects_4) $(am__objects_5) SymTab/Demangle.$(OBJEXT) \
     222        $(am__objects_6) Tuples/TupleAssignment.$(OBJEXT) \
     223        Tuples/TupleExpansion.$(OBJEXT) Tuples/Explode.$(OBJEXT) \
     224        Validate/HandleAttributes.$(OBJEXT)
     225am_libdemangle_a_OBJECTS = $(am__objects_7)
     226libdemangle_a_OBJECTS = $(am_libdemangle_a_OBJECTS)
     227am__installdirs = "$(DESTDIR)$(cfa_cpplibdir)"
     228PROGRAMS = $(cfa_cpplib_PROGRAMS)
     229am__objects_8 = main.$(OBJEXT) MakeLibCfa.$(OBJEXT) \
     230        CompilationState.$(OBJEXT) $(am__objects_1) \
     231        CodeGen/Generate.$(OBJEXT) CodeGen/FixNames.$(OBJEXT) \
     232        CodeTools/DeclStats.$(OBJEXT) \
     233        CodeTools/ResolvProtoDump.$(OBJEXT) \
     234        CodeTools/TrackLoc.$(OBJEXT) Concurrency/Keywords.$(OBJEXT) \
     235        Concurrency/Waitfor.$(OBJEXT) $(am__objects_2) \
     236        Common/DebugMalloc.$(OBJEXT) $(am__objects_3) \
     237        ControlStruct/ExceptTranslate.$(OBJEXT) GenPoly/Box.$(OBJEXT) \
     238        GenPoly/GenPoly.$(OBJEXT) GenPoly/ScrubTyVars.$(OBJEXT) \
     239        GenPoly/Lvalue.$(OBJEXT) GenPoly/Specialize.$(OBJEXT) \
     240        GenPoly/FindFunction.$(OBJEXT) \
     241        GenPoly/InstantiateGeneric.$(OBJEXT) \
     242        InitTweak/GenInit.$(OBJEXT) InitTweak/FixInit.$(OBJEXT) \
     243        InitTweak/FixGlobalInit.$(OBJEXT) \
     244        InitTweak/InitTweak.$(OBJEXT) Parser/parser.$(OBJEXT) \
     245        Parser/lex.$(OBJEXT) Parser/TypedefTable.$(OBJEXT) \
     246        Parser/ParseNode.$(OBJEXT) Parser/DeclarationNode.$(OBJEXT) \
     247        Parser/ExpressionNode.$(OBJEXT) Parser/StatementNode.$(OBJEXT) \
     248        Parser/InitializerNode.$(OBJEXT) Parser/TypeData.$(OBJEXT) \
     249        Parser/LinkageSpec.$(OBJEXT) Parser/parserutility.$(OBJEXT) \
     250        $(am__objects_4) ResolvExpr/AlternativePrinter.$(OBJEXT) \
     251        $(am__objects_5) $(am__objects_6) \
    293252        Tuples/TupleAssignment.$(OBJEXT) \
    294253        Tuples/TupleExpansion.$(OBJEXT) Tuples/Explode.$(OBJEXT) \
    295254        Validate/HandleAttributes.$(OBJEXT) \
    296255        Virtual/ExpandCasts.$(OBJEXT)
    297 am____driver_cfa_cpp_OBJECTS = $(am__objects_1)
     256am____driver_cfa_cpp_OBJECTS = $(am__objects_8)
    298257___driver_cfa_cpp_OBJECTS = $(am____driver_cfa_cpp_OBJECTS)
    299258___driver_cfa_cpp_DEPENDENCIES =
     
    563522AUTOMAKE_OPTIONS = foreign subdir-objects
    564523ACLOCAL_AMFLAGS = -I automake
    565 SRC = main.cc MakeLibCfa.cc CompilationState.cc CodeGen/Generate.cc \
    566         CodeGen/CodeGenerator.cc CodeGen/GenType.cc \
    567         CodeGen/FixNames.cc CodeGen/FixMain.cc \
    568         CodeGen/OperatorTable.cc CodeTools/DeclStats.cc \
     524SRC = main.cc MakeLibCfa.cc CompilationState.cc $(SRC_CODEGEN) \
     525        CodeGen/Generate.cc CodeGen/FixNames.cc CodeTools/DeclStats.cc \
    569526        CodeTools/ResolvProtoDump.cc CodeTools/TrackLoc.cc \
    570         Concurrency/Keywords.cc Concurrency/Waitfor.cc \
    571         Common/SemanticError.cc Common/UniqueName.cc \
    572         Common/DebugMalloc.cc Common/Assert.cc Common/Heap.cc \
    573         Common/Eval.cc ControlStruct/LabelGenerator.cc \
    574         ControlStruct/LabelFixer.cc ControlStruct/MLEMutator.cc \
    575         ControlStruct/Mutate.cc ControlStruct/ForExprMutator.cc \
     527        Concurrency/Keywords.cc Concurrency/Waitfor.cc $(SRC_COMMON) \
     528        Common/DebugMalloc.cc $(SRC_CONTROLSTRUCT) \
    576529        ControlStruct/ExceptTranslate.cc GenPoly/Box.cc \
    577530        GenPoly/GenPoly.cc GenPoly/ScrubTyVars.cc GenPoly/Lvalue.cc \
     
    584537        Parser/StatementNode.cc Parser/InitializerNode.cc \
    585538        Parser/TypeData.cc Parser/LinkageSpec.cc \
    586         Parser/parserutility.cc ResolvExpr/AlternativeFinder.cc \
    587         ResolvExpr/Alternative.cc ResolvExpr/Unify.cc \
    588         ResolvExpr/PtrsAssignable.cc ResolvExpr/CommonType.cc \
    589         ResolvExpr/ConversionCost.cc ResolvExpr/CastCost.cc \
    590         ResolvExpr/PtrsCastable.cc ResolvExpr/AdjustExprType.cc \
    591         ResolvExpr/AlternativePrinter.cc ResolvExpr/Resolver.cc \
    592         ResolvExpr/ResolveTypeof.cc ResolvExpr/RenameVars.cc \
    593         ResolvExpr/FindOpenVars.cc ResolvExpr/PolyCost.cc \
    594         ResolvExpr/Occurs.cc ResolvExpr/TypeEnvironment.cc \
    595         ResolvExpr/CurrentObject.cc ResolvExpr/ExplodedActual.cc \
    596         ResolvExpr/SpecCost.cc ResolvExpr/ResolveAssertions.cc \
    597         SymTab/Indexer.cc SymTab/Mangler.cc SymTab/ManglerCommon.cc \
    598         SymTab/Validate.cc SymTab/FixFunction.cc SymTab/Autogen.cc \
    599         SynTree/Type.cc SynTree/VoidType.cc SynTree/BasicType.cc \
    600         SynTree/PointerType.cc SynTree/ArrayType.cc \
    601         SynTree/ReferenceType.cc SynTree/FunctionType.cc \
    602         SynTree/ReferenceToType.cc SynTree/TupleType.cc \
    603         SynTree/TypeofType.cc SynTree/AttrType.cc \
    604         SynTree/VarArgsType.cc SynTree/ZeroOneType.cc \
    605         SynTree/Constant.cc SynTree/Expression.cc SynTree/TupleExpr.cc \
    606         SynTree/CommaExpr.cc SynTree/TypeExpr.cc \
    607         SynTree/ApplicationExpr.cc SynTree/AddressExpr.cc \
    608         SynTree/Statement.cc SynTree/CompoundStmt.cc \
    609         SynTree/DeclStmt.cc SynTree/Declaration.cc \
    610         SynTree/DeclarationWithType.cc SynTree/ObjectDecl.cc \
    611         SynTree/FunctionDecl.cc SynTree/AggregateDecl.cc \
    612         SynTree/NamedTypeDecl.cc SynTree/TypeDecl.cc \
    613         SynTree/Initializer.cc SynTree/TypeSubstitution.cc \
    614         SynTree/Attribute.cc SynTree/DeclReplacer.cc \
     539        Parser/parserutility.cc $(SRC_RESOLVEXPR) \
     540        ResolvExpr/AlternativePrinter.cc $(SRC_SYMTAB) $(SRC_SYNTREE) \
    615541        Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc \
    616542        Tuples/Explode.cc Validate/HandleAttributes.cc \
    617543        Virtual/ExpandCasts.cc
     544SRCDEMANGLE = CompilationState.cc $(SRC_CODEGEN) \
     545        Concurrency/Keywords.cc $(SRC_COMMON) $(SRC_CONTROLSTRUCT) \
     546        GenPoly/GenPoly.cc GenPoly/Lvalue.cc InitTweak/GenInit.cc \
     547        InitTweak/InitTweak.cc Parser/LinkageSpec.cc $(SRC_RESOLVEXPR) \
     548        $(SRC_SYMTAB) SymTab/Demangle.cc $(SRC_SYNTREE) \
     549        Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc \
     550        Tuples/Explode.cc Validate/HandleAttributes.cc
    618551MAINTAINERCLEANFILES = ${libdir}/${notdir ${cfa_cpplib_PROGRAMS}}
    619552MOSTLYCLEANFILES = Parser/lex.cc Parser/parser.cc Parser/parser.hh \
    620553        Parser/parser.output
     554SRC_CODEGEN = \
     555        CodeGen/CodeGenerator.cc \
     556        CodeGen/FixMain.cc \
     557        CodeGen/GenType.cc \
     558        CodeGen/OperatorTable.cc
     559
     560SRC_COMMON = \
     561      Common/Assert.cc \
     562      Common/Stats/Heap.cc \
     563      Common/Stats/Counter.cc \
     564      Common/Eval.cc \
     565      Common/SemanticError.cc \
     566      Common/UniqueName.cc
     567
     568SRC_CONTROLSTRUCT = \
     569        ControlStruct/ForExprMutator.cc \
     570        ControlStruct/LabelFixer.cc \
     571        ControlStruct/LabelGenerator.cc \
     572        ControlStruct/MLEMutator.cc \
     573        ControlStruct/Mutate.cc
     574
    621575BUILT_SOURCES = Parser/parser.hh
    622576AM_YFLAGS = -d -t -v
     577SRC_RESOLVEXPR = \
     578      ResolvExpr/AdjustExprType.cc \
     579      ResolvExpr/Alternative.cc \
     580      ResolvExpr/AlternativeFinder.cc \
     581      ResolvExpr/CastCost.cc \
     582      ResolvExpr/CommonType.cc \
     583      ResolvExpr/ConversionCost.cc \
     584      ResolvExpr/CurrentObject.cc \
     585      ResolvExpr/ExplodedActual.cc \
     586      ResolvExpr/FindOpenVars.cc \
     587      ResolvExpr/Occurs.cc \
     588      ResolvExpr/PolyCost.cc \
     589      ResolvExpr/PtrsAssignable.cc \
     590      ResolvExpr/PtrsCastable.cc \
     591      ResolvExpr/RenameVars.cc \
     592      ResolvExpr/ResolveAssertions.cc \
     593      ResolvExpr/Resolver.cc \
     594      ResolvExpr/ResolveTypeof.cc \
     595      ResolvExpr/SpecCost.cc \
     596      ResolvExpr/TypeEnvironment.cc \
     597      ResolvExpr/Unify.cc
     598
     599SRC_SYMTAB = \
     600      SymTab/Autogen.cc \
     601      SymTab/FixFunction.cc \
     602      SymTab/Indexer.cc \
     603      SymTab/Mangler.cc \
     604      SymTab/ManglerCommon.cc \
     605      SymTab/Validate.cc
     606
     607SRC_SYNTREE = \
     608      SynTree/Type.cc \
     609      SynTree/VoidType.cc \
     610      SynTree/BasicType.cc \
     611      SynTree/PointerType.cc \
     612      SynTree/ArrayType.cc \
     613      SynTree/ReferenceType.cc \
     614      SynTree/FunctionType.cc \
     615      SynTree/ReferenceToType.cc \
     616      SynTree/TupleType.cc \
     617      SynTree/TypeofType.cc \
     618      SynTree/AttrType.cc \
     619      SynTree/VarArgsType.cc \
     620      SynTree/ZeroOneType.cc \
     621      SynTree/Constant.cc \
     622      SynTree/Expression.cc \
     623      SynTree/TupleExpr.cc \
     624      SynTree/CommaExpr.cc \
     625      SynTree/TypeExpr.cc \
     626      SynTree/ApplicationExpr.cc \
     627      SynTree/AddressExpr.cc \
     628      SynTree/Statement.cc \
     629      SynTree/CompoundStmt.cc \
     630      SynTree/DeclStmt.cc \
     631      SynTree/Declaration.cc \
     632      SynTree/DeclarationWithType.cc \
     633      SynTree/ObjectDecl.cc \
     634      SynTree/FunctionDecl.cc \
     635      SynTree/AggregateDecl.cc \
     636      SynTree/NamedTypeDecl.cc \
     637      SynTree/TypeDecl.cc \
     638      SynTree/Initializer.cc \
     639      SynTree/TypeSubstitution.cc \
     640      SynTree/Attribute.cc \
     641      SynTree/DeclReplacer.cc
     642
    623643
    624644# put into lib for now
     
    630650ARFLAGS = cr
    631651demangler_SOURCES = SymTab/demangler.cc
    632 demangler_LDADD = libdemangle.a                 # yywrap
     652demangler_LDADD = libdemangle.a -ldl                    # yywrap
    633653noinst_LIBRARIES = libdemangle.a
    634 libdemangle_a_SOURCES = SymTab/Demangle.cc SymTab/ManglerCommon.cc \
    635         SynTree/Type.cc \
    636         SynTree/VoidType.cc \
    637         SynTree/BasicType.cc \
    638         SynTree/PointerType.cc \
    639         SynTree/ArrayType.cc \
    640         SynTree/ReferenceType.cc \
    641         SynTree/FunctionType.cc \
    642         SynTree/ReferenceToType.cc \
    643         SynTree/TupleType.cc \
    644         SynTree/TypeofType.cc \
    645         SynTree/AttrType.cc \
    646         SynTree/VarArgsType.cc \
    647         SynTree/ZeroOneType.cc \
    648         SynTree/Constant.cc \
    649         SynTree/Expression.cc \
    650         SynTree/TupleExpr.cc \
    651         SynTree/CommaExpr.cc \
    652         SynTree/TypeExpr.cc \
    653         SynTree/ApplicationExpr.cc \
    654         SynTree/AddressExpr.cc \
    655         SynTree/Statement.cc \
    656         SynTree/CompoundStmt.cc \
    657         SynTree/DeclStmt.cc \
    658         SynTree/Declaration.cc \
    659         SynTree/DeclarationWithType.cc \
    660         SynTree/ObjectDecl.cc \
    661         SynTree/FunctionDecl.cc \
    662         SynTree/AggregateDecl.cc \
    663         SynTree/NamedTypeDecl.cc \
    664         SynTree/TypeDecl.cc \
    665         SynTree/Initializer.cc \
    666         SynTree/TypeSubstitution.cc \
    667         SynTree/Attribute.cc \
    668         SynTree/DeclReplacer.cc \
    669         CompilationState.cc \
    670         CodeGen/CodeGenerator.cc \
    671         CodeGen/FixMain.cc \
    672         CodeGen/GenType.cc \
    673         CodeGen/OperatorTable.cc \
    674         Common/Assert.cc \
    675         Common/Eval.cc \
    676         Common/SemanticError.cc \
    677         Common/UniqueName.cc \
    678         Concurrency/Keywords.cc \
    679         ControlStruct/ForExprMutator.cc \
    680         ControlStruct/LabelFixer.cc \
    681         ControlStruct/LabelGenerator.cc \
    682         ControlStruct/MLEMutator.cc \
    683         ControlStruct/Mutate.cc \
    684         GenPoly/GenPoly.cc \
    685         GenPoly/Lvalue.cc \
    686         InitTweak/GenInit.cc \
    687         InitTweak/InitTweak.cc \
    688         Parser/LinkageSpec.cc \
    689         ResolvExpr/AdjustExprType.cc \
    690         ResolvExpr/Alternative.cc \
    691         ResolvExpr/AlternativeFinder.cc \
    692         ResolvExpr/ExplodedActual.cc \
    693         ResolvExpr/CastCost.cc \
    694         ResolvExpr/CommonType.cc \
    695         ResolvExpr/ConversionCost.cc \
    696         ResolvExpr/CurrentObject.cc \
    697         ResolvExpr/FindOpenVars.cc \
    698         ResolvExpr/Occurs.cc \
    699         ResolvExpr/PolyCost.cc \
    700         ResolvExpr/PtrsAssignable.cc \
    701         ResolvExpr/PtrsCastable.cc \
    702         ResolvExpr/RenameVars.cc \
    703         ResolvExpr/ResolveAssertions.cc \
    704         ResolvExpr/Resolver.cc \
    705         ResolvExpr/ResolveTypeof.cc \
    706         ResolvExpr/SpecCost.cc \
    707         ResolvExpr/TypeEnvironment.cc \
    708         ResolvExpr/Unify.cc \
    709         SymTab/Autogen.cc \
    710         SymTab/FixFunction.cc \
    711         SymTab/Indexer.cc \
    712         SymTab/Mangler.cc \
    713         SymTab/Validate.cc \
    714         Tuples/Explode.cc \
    715         Tuples/TupleAssignment.cc \
    716         Tuples/TupleExpansion.cc \
    717         Validate/HandleAttributes.cc
    718 
     654libdemangle_a_SOURCES = $(SRCDEMANGLE)
    719655all: $(BUILT_SOURCES)
    720656        $(MAKE) $(AM_MAKEFLAGS) all-am
     
    755691clean-noinstLIBRARIES:
    756692        -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
    757 SymTab/$(am__dirstamp):
    758         @$(MKDIR_P) SymTab
    759         @: > SymTab/$(am__dirstamp)
    760 SymTab/$(DEPDIR)/$(am__dirstamp):
    761         @$(MKDIR_P) SymTab/$(DEPDIR)
    762         @: > SymTab/$(DEPDIR)/$(am__dirstamp)
    763 SymTab/Demangle.$(OBJEXT): SymTab/$(am__dirstamp) \
    764         SymTab/$(DEPDIR)/$(am__dirstamp)
    765 SymTab/ManglerCommon.$(OBJEXT): SymTab/$(am__dirstamp) \
    766         SymTab/$(DEPDIR)/$(am__dirstamp)
    767 SynTree/$(am__dirstamp):
    768         @$(MKDIR_P) SynTree
    769         @: > SynTree/$(am__dirstamp)
    770 SynTree/$(DEPDIR)/$(am__dirstamp):
    771         @$(MKDIR_P) SynTree/$(DEPDIR)
    772         @: > SynTree/$(DEPDIR)/$(am__dirstamp)
    773 SynTree/Type.$(OBJEXT): SynTree/$(am__dirstamp) \
    774         SynTree/$(DEPDIR)/$(am__dirstamp)
    775 SynTree/VoidType.$(OBJEXT): SynTree/$(am__dirstamp) \
    776         SynTree/$(DEPDIR)/$(am__dirstamp)
    777 SynTree/BasicType.$(OBJEXT): SynTree/$(am__dirstamp) \
    778         SynTree/$(DEPDIR)/$(am__dirstamp)
    779 SynTree/PointerType.$(OBJEXT): SynTree/$(am__dirstamp) \
    780         SynTree/$(DEPDIR)/$(am__dirstamp)
    781 SynTree/ArrayType.$(OBJEXT): SynTree/$(am__dirstamp) \
    782         SynTree/$(DEPDIR)/$(am__dirstamp)
    783 SynTree/ReferenceType.$(OBJEXT): SynTree/$(am__dirstamp) \
    784         SynTree/$(DEPDIR)/$(am__dirstamp)
    785 SynTree/FunctionType.$(OBJEXT): SynTree/$(am__dirstamp) \
    786         SynTree/$(DEPDIR)/$(am__dirstamp)
    787 SynTree/ReferenceToType.$(OBJEXT): SynTree/$(am__dirstamp) \
    788         SynTree/$(DEPDIR)/$(am__dirstamp)
    789 SynTree/TupleType.$(OBJEXT): SynTree/$(am__dirstamp) \
    790         SynTree/$(DEPDIR)/$(am__dirstamp)
    791 SynTree/TypeofType.$(OBJEXT): SynTree/$(am__dirstamp) \
    792         SynTree/$(DEPDIR)/$(am__dirstamp)
    793 SynTree/AttrType.$(OBJEXT): SynTree/$(am__dirstamp) \
    794         SynTree/$(DEPDIR)/$(am__dirstamp)
    795 SynTree/VarArgsType.$(OBJEXT): SynTree/$(am__dirstamp) \
    796         SynTree/$(DEPDIR)/$(am__dirstamp)
    797 SynTree/ZeroOneType.$(OBJEXT): SynTree/$(am__dirstamp) \
    798         SynTree/$(DEPDIR)/$(am__dirstamp)
    799 SynTree/Constant.$(OBJEXT): SynTree/$(am__dirstamp) \
    800         SynTree/$(DEPDIR)/$(am__dirstamp)
    801 SynTree/Expression.$(OBJEXT): SynTree/$(am__dirstamp) \
    802         SynTree/$(DEPDIR)/$(am__dirstamp)
    803 SynTree/TupleExpr.$(OBJEXT): SynTree/$(am__dirstamp) \
    804         SynTree/$(DEPDIR)/$(am__dirstamp)
    805 SynTree/CommaExpr.$(OBJEXT): SynTree/$(am__dirstamp) \
    806         SynTree/$(DEPDIR)/$(am__dirstamp)
    807 SynTree/TypeExpr.$(OBJEXT): SynTree/$(am__dirstamp) \
    808         SynTree/$(DEPDIR)/$(am__dirstamp)
    809 SynTree/ApplicationExpr.$(OBJEXT): SynTree/$(am__dirstamp) \
    810         SynTree/$(DEPDIR)/$(am__dirstamp)
    811 SynTree/AddressExpr.$(OBJEXT): SynTree/$(am__dirstamp) \
    812         SynTree/$(DEPDIR)/$(am__dirstamp)
    813 SynTree/Statement.$(OBJEXT): SynTree/$(am__dirstamp) \
    814         SynTree/$(DEPDIR)/$(am__dirstamp)
    815 SynTree/CompoundStmt.$(OBJEXT): SynTree/$(am__dirstamp) \
    816         SynTree/$(DEPDIR)/$(am__dirstamp)
    817 SynTree/DeclStmt.$(OBJEXT): SynTree/$(am__dirstamp) \
    818         SynTree/$(DEPDIR)/$(am__dirstamp)
    819 SynTree/Declaration.$(OBJEXT): SynTree/$(am__dirstamp) \
    820         SynTree/$(DEPDIR)/$(am__dirstamp)
    821 SynTree/DeclarationWithType.$(OBJEXT): SynTree/$(am__dirstamp) \
    822         SynTree/$(DEPDIR)/$(am__dirstamp)
    823 SynTree/ObjectDecl.$(OBJEXT): SynTree/$(am__dirstamp) \
    824         SynTree/$(DEPDIR)/$(am__dirstamp)
    825 SynTree/FunctionDecl.$(OBJEXT): SynTree/$(am__dirstamp) \
    826         SynTree/$(DEPDIR)/$(am__dirstamp)
    827 SynTree/AggregateDecl.$(OBJEXT): SynTree/$(am__dirstamp) \
    828         SynTree/$(DEPDIR)/$(am__dirstamp)
    829 SynTree/NamedTypeDecl.$(OBJEXT): SynTree/$(am__dirstamp) \
    830         SynTree/$(DEPDIR)/$(am__dirstamp)
    831 SynTree/TypeDecl.$(OBJEXT): SynTree/$(am__dirstamp) \
    832         SynTree/$(DEPDIR)/$(am__dirstamp)
    833 SynTree/Initializer.$(OBJEXT): SynTree/$(am__dirstamp) \
    834         SynTree/$(DEPDIR)/$(am__dirstamp)
    835 SynTree/TypeSubstitution.$(OBJEXT): SynTree/$(am__dirstamp) \
    836         SynTree/$(DEPDIR)/$(am__dirstamp)
    837 SynTree/Attribute.$(OBJEXT): SynTree/$(am__dirstamp) \
    838         SynTree/$(DEPDIR)/$(am__dirstamp)
    839 SynTree/DeclReplacer.$(OBJEXT): SynTree/$(am__dirstamp) \
    840         SynTree/$(DEPDIR)/$(am__dirstamp)
    841693CodeGen/$(am__dirstamp):
    842694        @$(MKDIR_P) CodeGen
     
    853705CodeGen/OperatorTable.$(OBJEXT): CodeGen/$(am__dirstamp) \
    854706        CodeGen/$(DEPDIR)/$(am__dirstamp)
     707Concurrency/$(am__dirstamp):
     708        @$(MKDIR_P) Concurrency
     709        @: > Concurrency/$(am__dirstamp)
     710Concurrency/$(DEPDIR)/$(am__dirstamp):
     711        @$(MKDIR_P) Concurrency/$(DEPDIR)
     712        @: > Concurrency/$(DEPDIR)/$(am__dirstamp)
     713Concurrency/Keywords.$(OBJEXT): Concurrency/$(am__dirstamp) \
     714        Concurrency/$(DEPDIR)/$(am__dirstamp)
    855715Common/$(am__dirstamp):
    856716        @$(MKDIR_P) Common
     
    861721Common/Assert.$(OBJEXT): Common/$(am__dirstamp) \
    862722        Common/$(DEPDIR)/$(am__dirstamp)
     723Common/Stats/$(am__dirstamp):
     724        @$(MKDIR_P) Common/Stats
     725        @: > Common/Stats/$(am__dirstamp)
     726Common/Stats/$(DEPDIR)/$(am__dirstamp):
     727        @$(MKDIR_P) Common/Stats/$(DEPDIR)
     728        @: > Common/Stats/$(DEPDIR)/$(am__dirstamp)
     729Common/Stats/Heap.$(OBJEXT): Common/Stats/$(am__dirstamp) \
     730        Common/Stats/$(DEPDIR)/$(am__dirstamp)
     731Common/Stats/Counter.$(OBJEXT): Common/Stats/$(am__dirstamp) \
     732        Common/Stats/$(DEPDIR)/$(am__dirstamp)
    863733Common/Eval.$(OBJEXT): Common/$(am__dirstamp) \
    864734        Common/$(DEPDIR)/$(am__dirstamp)
     
    867737Common/UniqueName.$(OBJEXT): Common/$(am__dirstamp) \
    868738        Common/$(DEPDIR)/$(am__dirstamp)
    869 Concurrency/$(am__dirstamp):
    870         @$(MKDIR_P) Concurrency
    871         @: > Concurrency/$(am__dirstamp)
    872 Concurrency/$(DEPDIR)/$(am__dirstamp):
    873         @$(MKDIR_P) Concurrency/$(DEPDIR)
    874         @: > Concurrency/$(DEPDIR)/$(am__dirstamp)
    875 Concurrency/Keywords.$(OBJEXT): Concurrency/$(am__dirstamp) \
    876         Concurrency/$(DEPDIR)/$(am__dirstamp)
    877739ControlStruct/$(am__dirstamp):
    878740        @$(MKDIR_P) ControlStruct
     
    931793ResolvExpr/AlternativeFinder.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
    932794        ResolvExpr/$(DEPDIR)/$(am__dirstamp)
     795ResolvExpr/CastCost.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
     796        ResolvExpr/$(DEPDIR)/$(am__dirstamp)
     797ResolvExpr/CommonType.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
     798        ResolvExpr/$(DEPDIR)/$(am__dirstamp)
     799ResolvExpr/ConversionCost.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
     800        ResolvExpr/$(DEPDIR)/$(am__dirstamp)
     801ResolvExpr/CurrentObject.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
     802        ResolvExpr/$(DEPDIR)/$(am__dirstamp)
    933803ResolvExpr/ExplodedActual.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
    934804        ResolvExpr/$(DEPDIR)/$(am__dirstamp)
    935 ResolvExpr/CastCost.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
    936         ResolvExpr/$(DEPDIR)/$(am__dirstamp)
    937 ResolvExpr/CommonType.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
    938         ResolvExpr/$(DEPDIR)/$(am__dirstamp)
    939 ResolvExpr/ConversionCost.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
    940         ResolvExpr/$(DEPDIR)/$(am__dirstamp)
    941 ResolvExpr/CurrentObject.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
    942         ResolvExpr/$(DEPDIR)/$(am__dirstamp)
    943805ResolvExpr/FindOpenVars.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
    944806        ResolvExpr/$(DEPDIR)/$(am__dirstamp)
     
    965827ResolvExpr/Unify.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
    966828        ResolvExpr/$(DEPDIR)/$(am__dirstamp)
     829SymTab/$(am__dirstamp):
     830        @$(MKDIR_P) SymTab
     831        @: > SymTab/$(am__dirstamp)
     832SymTab/$(DEPDIR)/$(am__dirstamp):
     833        @$(MKDIR_P) SymTab/$(DEPDIR)
     834        @: > SymTab/$(DEPDIR)/$(am__dirstamp)
    967835SymTab/Autogen.$(OBJEXT): SymTab/$(am__dirstamp) \
    968836        SymTab/$(DEPDIR)/$(am__dirstamp)
     
    973841SymTab/Mangler.$(OBJEXT): SymTab/$(am__dirstamp) \
    974842        SymTab/$(DEPDIR)/$(am__dirstamp)
     843SymTab/ManglerCommon.$(OBJEXT): SymTab/$(am__dirstamp) \
     844        SymTab/$(DEPDIR)/$(am__dirstamp)
    975845SymTab/Validate.$(OBJEXT): SymTab/$(am__dirstamp) \
    976846        SymTab/$(DEPDIR)/$(am__dirstamp)
     847SymTab/Demangle.$(OBJEXT): SymTab/$(am__dirstamp) \
     848        SymTab/$(DEPDIR)/$(am__dirstamp)
     849SynTree/$(am__dirstamp):
     850        @$(MKDIR_P) SynTree
     851        @: > SynTree/$(am__dirstamp)
     852SynTree/$(DEPDIR)/$(am__dirstamp):
     853        @$(MKDIR_P) SynTree/$(DEPDIR)
     854        @: > SynTree/$(DEPDIR)/$(am__dirstamp)
     855SynTree/Type.$(OBJEXT): SynTree/$(am__dirstamp) \
     856        SynTree/$(DEPDIR)/$(am__dirstamp)
     857SynTree/VoidType.$(OBJEXT): SynTree/$(am__dirstamp) \
     858        SynTree/$(DEPDIR)/$(am__dirstamp)
     859SynTree/BasicType.$(OBJEXT): SynTree/$(am__dirstamp) \
     860        SynTree/$(DEPDIR)/$(am__dirstamp)
     861SynTree/PointerType.$(OBJEXT): SynTree/$(am__dirstamp) \
     862        SynTree/$(DEPDIR)/$(am__dirstamp)
     863SynTree/ArrayType.$(OBJEXT): SynTree/$(am__dirstamp) \
     864        SynTree/$(DEPDIR)/$(am__dirstamp)
     865SynTree/ReferenceType.$(OBJEXT): SynTree/$(am__dirstamp) \
     866        SynTree/$(DEPDIR)/$(am__dirstamp)
     867SynTree/FunctionType.$(OBJEXT): SynTree/$(am__dirstamp) \
     868        SynTree/$(DEPDIR)/$(am__dirstamp)
     869SynTree/ReferenceToType.$(OBJEXT): SynTree/$(am__dirstamp) \
     870        SynTree/$(DEPDIR)/$(am__dirstamp)
     871SynTree/TupleType.$(OBJEXT): SynTree/$(am__dirstamp) \
     872        SynTree/$(DEPDIR)/$(am__dirstamp)
     873SynTree/TypeofType.$(OBJEXT): SynTree/$(am__dirstamp) \
     874        SynTree/$(DEPDIR)/$(am__dirstamp)
     875SynTree/AttrType.$(OBJEXT): SynTree/$(am__dirstamp) \
     876        SynTree/$(DEPDIR)/$(am__dirstamp)
     877SynTree/VarArgsType.$(OBJEXT): SynTree/$(am__dirstamp) \
     878        SynTree/$(DEPDIR)/$(am__dirstamp)
     879SynTree/ZeroOneType.$(OBJEXT): SynTree/$(am__dirstamp) \
     880        SynTree/$(DEPDIR)/$(am__dirstamp)
     881SynTree/Constant.$(OBJEXT): SynTree/$(am__dirstamp) \
     882        SynTree/$(DEPDIR)/$(am__dirstamp)
     883SynTree/Expression.$(OBJEXT): SynTree/$(am__dirstamp) \
     884        SynTree/$(DEPDIR)/$(am__dirstamp)
     885SynTree/TupleExpr.$(OBJEXT): SynTree/$(am__dirstamp) \
     886        SynTree/$(DEPDIR)/$(am__dirstamp)
     887SynTree/CommaExpr.$(OBJEXT): SynTree/$(am__dirstamp) \
     888        SynTree/$(DEPDIR)/$(am__dirstamp)
     889SynTree/TypeExpr.$(OBJEXT): SynTree/$(am__dirstamp) \
     890        SynTree/$(DEPDIR)/$(am__dirstamp)
     891SynTree/ApplicationExpr.$(OBJEXT): SynTree/$(am__dirstamp) \
     892        SynTree/$(DEPDIR)/$(am__dirstamp)
     893SynTree/AddressExpr.$(OBJEXT): SynTree/$(am__dirstamp) \
     894        SynTree/$(DEPDIR)/$(am__dirstamp)
     895SynTree/Statement.$(OBJEXT): SynTree/$(am__dirstamp) \
     896        SynTree/$(DEPDIR)/$(am__dirstamp)
     897SynTree/CompoundStmt.$(OBJEXT): SynTree/$(am__dirstamp) \
     898        SynTree/$(DEPDIR)/$(am__dirstamp)
     899SynTree/DeclStmt.$(OBJEXT): SynTree/$(am__dirstamp) \
     900        SynTree/$(DEPDIR)/$(am__dirstamp)
     901SynTree/Declaration.$(OBJEXT): SynTree/$(am__dirstamp) \
     902        SynTree/$(DEPDIR)/$(am__dirstamp)
     903SynTree/DeclarationWithType.$(OBJEXT): SynTree/$(am__dirstamp) \
     904        SynTree/$(DEPDIR)/$(am__dirstamp)
     905SynTree/ObjectDecl.$(OBJEXT): SynTree/$(am__dirstamp) \
     906        SynTree/$(DEPDIR)/$(am__dirstamp)
     907SynTree/FunctionDecl.$(OBJEXT): SynTree/$(am__dirstamp) \
     908        SynTree/$(DEPDIR)/$(am__dirstamp)
     909SynTree/AggregateDecl.$(OBJEXT): SynTree/$(am__dirstamp) \
     910        SynTree/$(DEPDIR)/$(am__dirstamp)
     911SynTree/NamedTypeDecl.$(OBJEXT): SynTree/$(am__dirstamp) \
     912        SynTree/$(DEPDIR)/$(am__dirstamp)
     913SynTree/TypeDecl.$(OBJEXT): SynTree/$(am__dirstamp) \
     914        SynTree/$(DEPDIR)/$(am__dirstamp)
     915SynTree/Initializer.$(OBJEXT): SynTree/$(am__dirstamp) \
     916        SynTree/$(DEPDIR)/$(am__dirstamp)
     917SynTree/TypeSubstitution.$(OBJEXT): SynTree/$(am__dirstamp) \
     918        SynTree/$(DEPDIR)/$(am__dirstamp)
     919SynTree/Attribute.$(OBJEXT): SynTree/$(am__dirstamp) \
     920        SynTree/$(DEPDIR)/$(am__dirstamp)
     921SynTree/DeclReplacer.$(OBJEXT): SynTree/$(am__dirstamp) \
     922        SynTree/$(DEPDIR)/$(am__dirstamp)
    977923Tuples/$(am__dirstamp):
    978924        @$(MKDIR_P) Tuples
     
    981927        @$(MKDIR_P) Tuples/$(DEPDIR)
    982928        @: > Tuples/$(DEPDIR)/$(am__dirstamp)
    983 Tuples/Explode.$(OBJEXT): Tuples/$(am__dirstamp) \
    984         Tuples/$(DEPDIR)/$(am__dirstamp)
    985929Tuples/TupleAssignment.$(OBJEXT): Tuples/$(am__dirstamp) \
    986930        Tuples/$(DEPDIR)/$(am__dirstamp)
    987931Tuples/TupleExpansion.$(OBJEXT): Tuples/$(am__dirstamp) \
     932        Tuples/$(DEPDIR)/$(am__dirstamp)
     933Tuples/Explode.$(OBJEXT): Tuples/$(am__dirstamp) \
    988934        Tuples/$(DEPDIR)/$(am__dirstamp)
    989935Validate/$(am__dirstamp):
     
    10681014        Concurrency/$(DEPDIR)/$(am__dirstamp)
    10691015Common/DebugMalloc.$(OBJEXT): Common/$(am__dirstamp) \
    1070         Common/$(DEPDIR)/$(am__dirstamp)
    1071 Common/Heap.$(OBJEXT): Common/$(am__dirstamp) \
    10721016        Common/$(DEPDIR)/$(am__dirstamp)
    10731017ControlStruct/ExceptTranslate.$(OBJEXT):  \
     
    11401084        -rm -f CodeTools/*.$(OBJEXT)
    11411085        -rm -f Common/*.$(OBJEXT)
     1086        -rm -f Common/Stats/*.$(OBJEXT)
    11421087        -rm -f Concurrency/*.$(OBJEXT)
    11431088        -rm -f ControlStruct/*.$(OBJEXT)
     
    11701115@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/DebugMalloc.Po@am__quote@
    11711116@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/Eval.Po@am__quote@
    1172 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/Heap.Po@am__quote@
    11731117@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/SemanticError.Po@am__quote@
    11741118@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/UniqueName.Po@am__quote@
     1119@AMDEP_TRUE@@am__include@ @am__quote@Common/Stats/$(DEPDIR)/Counter.Po@am__quote@
     1120@AMDEP_TRUE@@am__include@ @am__quote@Common/Stats/$(DEPDIR)/Heap.Po@am__quote@
    11751121@AMDEP_TRUE@@am__include@ @am__quote@Concurrency/$(DEPDIR)/Keywords.Po@am__quote@
    11761122@AMDEP_TRUE@@am__include@ @am__quote@Concurrency/$(DEPDIR)/Waitfor.Po@am__quote@
     
    14341380        -rm -f Common/$(DEPDIR)/$(am__dirstamp)
    14351381        -rm -f Common/$(am__dirstamp)
     1382        -rm -f Common/Stats/$(DEPDIR)/$(am__dirstamp)
     1383        -rm -f Common/Stats/$(am__dirstamp)
    14361384        -rm -f Concurrency/$(DEPDIR)/$(am__dirstamp)
    14371385        -rm -f Concurrency/$(am__dirstamp)
     
    14711419
    14721420distclean: distclean-am
    1473         -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) Validate/$(DEPDIR) Virtual/$(DEPDIR)
     1421        -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Common/Stats/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Validate/$(DEPDIR) Virtual/$(DEPDIR)
    14741422        -rm -f Makefile
    14751423distclean-am: clean-am distclean-compile distclean-generic \
     
    15171465
    15181466maintainer-clean: maintainer-clean-am
    1519         -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) Validate/$(DEPDIR) Virtual/$(DEPDIR)
     1467        -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Common/Stats/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Validate/$(DEPDIR) Virtual/$(DEPDIR)
    15201468        -rm -f Makefile
    15211469maintainer-clean-am: distclean-am maintainer-clean-generic
  • src/Parser/TypeData.h

    rf56c32e r0050a5f  
    3131        struct Aggregate_t {
    3232                DeclarationNode::Aggregate kind;
    33                 const std::string * name;
    34                 DeclarationNode * params;
    35                 ExpressionNode * actuals;                                               // holds actual parameters later applied to AggInst
    36                 DeclarationNode * fields;
     33                const std::string * name = nullptr;
     34                DeclarationNode * params = nullptr;
     35                ExpressionNode * actuals = nullptr;                                             // holds actual parameters later applied to AggInst
     36                DeclarationNode * fields = nullptr;
    3737                bool body;
    3838                bool anon;
    3939
    4040                bool tagged;
    41                 const std::string * parent;
     41                const std::string * parent = nullptr;
    4242        };
    4343
    4444        struct AggInst_t {
    45                 TypeData * aggregate;
    46                 ExpressionNode * params;
     45                TypeData * aggregate = nullptr;
     46                ExpressionNode * params = nullptr;
    4747                bool hoistType;
    4848        };
    4949
    5050        struct Array_t {
    51                 ExpressionNode * dimension;
     51                ExpressionNode * dimension = nullptr;
    5252                bool isVarLen;
    5353                bool isStatic;
     
    5555
    5656        struct Enumeration_t {
    57                 const std::string * name;
    58                 DeclarationNode * constants;
     57                const std::string * name = nullptr;
     58                DeclarationNode * constants = nullptr;
    5959                bool body;
    6060                bool anon;
     
    6262
    6363        struct Function_t {
    64                 mutable DeclarationNode * params;                               // mutables modified in buildKRFunction
    65                 mutable DeclarationNode * idList;                               // old-style
    66                 mutable DeclarationNode * oldDeclList;
    67                 StatementNode * body;
    68                 ExpressionNode * withExprs;                                             // expressions from function's with_clause
     64                mutable DeclarationNode * params = nullptr;                             // mutables modified in buildKRFunction
     65                mutable DeclarationNode * idList = nullptr;                             // old-style
     66                mutable DeclarationNode * oldDeclList = nullptr;
     67                StatementNode * body = nullptr;
     68                ExpressionNode * withExprs = nullptr;                                           // expressions from function's with_clause
    6969        };
    7070
    7171        struct Symbolic_t {
    72                 const std::string * name;
     72                const std::string * name = nullptr;
    7373                bool isTypedef;                                                                 // false => TYPEGENname, true => TYPEDEFname
    74                 DeclarationNode * params;
    75                 ExpressionNode * actuals;
    76                 DeclarationNode * assertions;
     74                DeclarationNode * params = nullptr;
     75                ExpressionNode * actuals = nullptr;
     76                DeclarationNode * assertions = nullptr;
    7777        };
    7878
    7979        struct Qualified_t {                                                            // qualified type S.T
    80                 TypeData * parent;
    81                 TypeData * child;
     80                TypeData * parent = nullptr;
     81                TypeData * child = nullptr;
    8282        };
    8383
     
    9393
    9494        Type::Qualifiers qualifiers;
    95         DeclarationNode * forall;
     95        DeclarationNode * forall = nullptr;
    9696
    9797        Aggregate_t aggregate;
     
    102102        Symbolic_t symbolic;
    103103        Qualified_t qualified;
    104         DeclarationNode * tuple;
    105         ExpressionNode * typeexpr;
     104        DeclarationNode * tuple = nullptr;
     105        ExpressionNode * typeexpr = nullptr;
    106106
    107107        TypeData( Kind k = Unknown );
  • src/Parser/module.mk

    rf56c32e r0050a5f  
    3131       Parser/parserutility.cc
    3232
     33SRCDEMANGLE += \
     34        Parser/LinkageSpec.cc
     35
     36
    3337MOSTLYCLEANFILES += Parser/lex.cc Parser/parser.cc Parser/parser.hh Parser/parser.output
  • src/ResolvExpr/CommonType.cc

    rf56c32e r0050a5f  
    177177
    178178        // GENERATED START, DO NOT EDIT
    179         // GENERATED BY BasicTypes-gen.cc
     179        // GENERATED BY ../../main/src/BasicTypes-gen.cc
    180180        #define BT BasicType::
    181181        static const BasicType::Kind commonTypes[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // nearest common ancestor
  • src/ResolvExpr/ConversionCost.cc

    rf56c32e r0050a5f  
    182182
    183183        // GENERATED START, DO NOT EDIT
    184         // GENERATED BY BasicTypes-gen.cc
     184        // GENERATED BY ../../main/src/BasicTypes-gen.cc
    185185        /* EXTENDED INTEGRAL RANK HIERARCHY (root to leaves)
    186186                                 _Bool
     
    207207
    208208        // GENERATED START, DO NOT EDIT
    209         // GENERATED BY BasicTypes-gen.cc
     209        // GENERATED BY ../../main/src/BasicTypes-gen.cc
    210210        static const int costMatrix[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // path length from root to node
    211211                /*             B    C   SC   UC   SI  SUI    I   UI   LI  LUI  LLI LLUI   IB  UIB  _FH  _FH   _F  _FC    F   FC  _FX _FXC   FD _FDC    D   DC F80X_FDXC  F80  _FB_FLDC   FB   LD  LDC _FBX_FLDXC */
     
    254254
    255255        // GENERATED START, DO NOT EDIT
    256         // GENERATED BY BasicTypes-gen.cc
     256        // GENERATED BY ../../main/src/BasicTypes-gen.cc
    257257        static const int signMatrix[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion
    258258                /*             B    C   SC   UC   SI  SUI    I   UI   LI  LUI  LLI LLUI   IB  UIB  _FH  _FH   _F  _FC    F   FC  _FX _FXC   FD _FDC    D   DC F80X_FDXC  F80  _FB_FLDC   FB   LD  LDC _FBX_FLDXC */
  • src/ResolvExpr/module.mk

    rf56c32e r0050a5f  
    1515###############################################################################
    1616
    17 SRC += ResolvExpr/AlternativeFinder.cc \
    18        ResolvExpr/Alternative.cc \
    19        ResolvExpr/Unify.cc \
    20        ResolvExpr/PtrsAssignable.cc \
    21        ResolvExpr/CommonType.cc \
    22        ResolvExpr/ConversionCost.cc \
    23        ResolvExpr/CastCost.cc \
    24        ResolvExpr/PtrsCastable.cc \
    25        ResolvExpr/AdjustExprType.cc \
    26        ResolvExpr/AlternativePrinter.cc \
    27        ResolvExpr/Resolver.cc \
    28        ResolvExpr/ResolveTypeof.cc \
    29        ResolvExpr/RenameVars.cc \
    30        ResolvExpr/FindOpenVars.cc \
    31        ResolvExpr/PolyCost.cc \
    32        ResolvExpr/Occurs.cc \
    33        ResolvExpr/TypeEnvironment.cc \
    34        ResolvExpr/CurrentObject.cc \
    35        ResolvExpr/ExplodedActual.cc \
    36        ResolvExpr/SpecCost.cc \
    37        ResolvExpr/ResolveAssertions.cc
     17SRC_RESOLVEXPR = \
     18      ResolvExpr/AdjustExprType.cc \
     19      ResolvExpr/Alternative.cc \
     20      ResolvExpr/AlternativeFinder.cc \
     21      ResolvExpr/CastCost.cc \
     22      ResolvExpr/CommonType.cc \
     23      ResolvExpr/ConversionCost.cc \
     24      ResolvExpr/CurrentObject.cc \
     25      ResolvExpr/ExplodedActual.cc \
     26      ResolvExpr/FindOpenVars.cc \
     27      ResolvExpr/Occurs.cc \
     28      ResolvExpr/PolyCost.cc \
     29      ResolvExpr/PtrsAssignable.cc \
     30      ResolvExpr/PtrsCastable.cc \
     31      ResolvExpr/RenameVars.cc \
     32      ResolvExpr/ResolveAssertions.cc \
     33      ResolvExpr/Resolver.cc \
     34      ResolvExpr/ResolveTypeof.cc \
     35      ResolvExpr/SpecCost.cc \
     36      ResolvExpr/TypeEnvironment.cc \
     37      ResolvExpr/Unify.cc
     38
     39SRC += $(SRC_RESOLVEXPR) ResolvExpr/AlternativePrinter.cc
     40SRCDEMANGLE += $(SRC_RESOLVEXPR)
  • src/SymTab/Indexer.cc

    rf56c32e r0050a5f  
    2626#include "Common/SemanticError.h"  // for SemanticError
    2727#include "Common/utility.h"        // for cloneAll
     28#include "Common/Stats/Counter.h" // for counters
    2829#include "GenPoly/GenPoly.h"
    2930#include "InitTweak/InitTweak.h"   // for isConstructor, isCopyFunction, isC...
     
    4142
    4243namespace SymTab {
     44
     45        // Statistics block
     46        namespace {
     47                auto idtable_group = new Stats::Counters::CounterGroup("IdTable");
     48                auto idtable_find  = new Stats::Counters::SimpleCounter("Find calls", idtable_group);
     49                auto idtable_size  = new Stats::Counters::AverageCounter<double>("Average Size", idtable_group);
     50                auto idtable_key   = new Stats::Counters::AverageCounter<double>("Average Key Size", idtable_group);
     51
     52                auto indexers_group = new Stats::Counters::CounterGroup("Indexers");
     53                auto indexers_count = new Stats::Counters::SimpleCounter("Count", indexers_group);
     54                auto indexers_size  = new Stats::Counters::AverageCounter<double>("Average Size", indexers_group);
     55                auto indexers_depth_a  = new Stats::Counters::AverageCounter<double>("Average Depth", indexers_group);
     56                auto indexers_depth_m  = new Stats::Counters::MaxCounter<size_t>("Max Depth", indexers_group);
     57        }
     58
    4359        std::ostream & operator<<( std::ostream & out, const Indexer::IdData & data ) {
    4460                return out << "(" << data.id << "," << data.baseExpr << ")";
     
    197213        }
    198214
    199         Indexer::Indexer() : tables( 0 ), scope( 0 ) {}
    200 
    201         Indexer::Indexer( const Indexer &that ) : doDebug( that.doDebug ), tables( newRef( that.tables ) ), scope( that.scope ) {}
     215        Indexer::Indexer() : tables( 0 ), scope( 0 ) {
     216                (*indexers_count)++;
     217        }
     218
     219        Indexer::Indexer( const Indexer &that ) : doDebug( that.doDebug ), tables( newRef( that.tables ) ), scope( that.scope ) {
     220                (*indexers_count)++;
     221        }
    202222
    203223        Indexer::Indexer( Indexer &&that ) : doDebug( that.doDebug ), tables( that.tables ), scope( that.scope ) {
     
    206226
    207227        Indexer::~Indexer() {
     228                if(tables) {
     229                        indexers_size->push( tables->idTable.size() );
     230                        size_t depth = 1;
     231                        for( auto crnt = tables->base.tables; crnt; crnt = crnt->base.tables ) {
     232                                ++depth;
     233                        }
     234                        indexers_depth_a->push( depth );
     235                        indexers_depth_m->push( depth );
     236                }
    208237                deleteRef( tables );
    209238        }
     
    237266                while ( searchTables ) {
    238267
     268                        (*idtable_find)++;
     269                        idtable_key->push( id.size() );
     270                        idtable_size->push( searchTables->idTable.size() );
    239271                        IdTable::const_iterator decls = searchTables->idTable.find( id );
    240272                        if ( decls != searchTables->idTable.end() ) {
     
    313345                if ( tables->scope < scope ) return nullptr;
    314346
     347                (*idtable_find)++;
     348                idtable_key->push( id.size() );
     349                idtable_size->push( tables->idTable.size() );
    315350                IdTable::const_iterator decls = tables->idTable.find( id );
    316351                if ( decls != tables->idTable.end() ) {
     
    331366                if ( tables->scope < scope ) return false;
    332367
     368                (*idtable_find)++;
     369                idtable_key->push( id.size() );
     370                idtable_size->push( tables->idTable.size() );
    333371                IdTable::const_iterator decls = tables->idTable.find( id );
    334372                if ( decls != tables->idTable.end() ) {
     
    347385                if ( tables->scope < scope ) return false;
    348386
     387                (*idtable_find)++;
     388                idtable_key->push( id.size() );
     389                idtable_size->push( tables->idTable.size() );
    349390                IdTable::const_iterator decls = tables->idTable.find( id );
    350391                if ( decls != tables->idTable.end() ) {
  • src/SymTab/ManglerCommon.cc

    rf56c32e r0050a5f  
    2424
    2525                        // GENERATED START, DO NOT EDIT
    26                         // GENERATED BY BasicTypes-gen.cc
     26                        // GENERATED BY ../../main/src/BasicTypes-gen.cc
    2727                        // NOTES ON MANGLING:
    2828                        // * Itanium spec says that Float80 encodes to "e" (like LongDouble), but the distinct lengths cause resolution problems.
  • src/SymTab/Validate.cc

    rf56c32e r0050a5f  
    4949#include "CodeGen/OperatorTable.h"     // for isCtorDtor, isCtorDtorAssign
    5050#include "ControlStruct/Mutate.h"      // for ForExprMutator
     51#include "Common/Stats.h"              // for Stats::Heap
    5152#include "Common/PassVisitor.h"        // for PassVisitor, WithDeclsToAdd
    5253#include "Common/ScopedMap.h"          // for ScopedMap
     
    303304                PassVisitor<FixQualifiedTypes> fixQual;
    304305
     306                Stats::Heap::newPass("validate-A");
    305307                acceptAll( translationUnit, hoistDecls );
    306308                ReplaceTypedef::replaceTypedef( translationUnit );
    307309                ReturnTypeFixer::fix( translationUnit ); // must happen before autogen
    308310                acceptAll( translationUnit, epc ); // must happen before VerifyCtorDtorAssign, because void return objects should not exist; before LinkReferenceToTypes because it is an indexer and needs correct types for mangling
     311                Stats::Heap::newPass("validate-B");
    309312                acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions
    310313                mutateAll( translationUnit, fixQual ); // must happen after LinkReferenceToTypes, because aggregate members are accessed
    311314                HoistStruct::hoistStruct( translationUnit ); // must happen after EliminateTypedef, so that aggregate typedefs occur in the correct order
    312315                EliminateTypedef::eliminateTypedef( translationUnit ); //
     316                Stats::Heap::newPass("validate-C");
    313317                acceptAll( translationUnit, genericParams );  // check as early as possible - can't happen before LinkReferenceToTypes
    314318                VerifyCtorDtorAssign::verify( translationUnit );  // must happen before autogen, because autogen examines existing ctor/dtors
    315319                ReturnChecker::checkFunctionReturns( translationUnit );
    316320                InitTweak::fixReturnStatements( translationUnit ); // must happen before autogen
     321                Stats::Heap::newPass("validate-D");
    317322                Concurrency::applyKeywords( translationUnit );
    318323                acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines, after Concurrency::applyKeywords because uniqueIds must be set on declaration before resolution
    319324                ControlStruct::hoistControlDecls( translationUnit );  // hoist initialization out of for statements; must happen before autogenerateRoutines
    320325                autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecay
     326                Stats::Heap::newPass("validate-E");
    321327                Concurrency::implementMutexFuncs( translationUnit );
    322328                Concurrency::implementThreadStarter( translationUnit );
    323329                mutateAll( translationUnit, compoundliteral );
    324330                ResolvExpr::resolveWithExprs( translationUnit ); // must happen before FixObjectType because user-code is resolved and may contain with variables
     331                Stats::Heap::newPass("validate-F");
    325332                FixObjectType::fix( translationUnit );
    326333                ArrayLength::computeLength( translationUnit );
  • src/SymTab/module.mk

    rf56c32e r0050a5f  
    1515###############################################################################
    1616
    17 SRC += SymTab/Indexer.cc \
    18        SymTab/Mangler.cc \
    19        SymTab/ManglerCommon.cc \
    20        SymTab/Validate.cc \
    21        SymTab/FixFunction.cc \
    22        SymTab/Autogen.cc
     17SRC_SYMTAB = \
     18      SymTab/Autogen.cc \
     19      SymTab/FixFunction.cc \
     20      SymTab/Indexer.cc \
     21      SymTab/Mangler.cc \
     22      SymTab/ManglerCommon.cc \
     23      SymTab/Validate.cc
     24
     25SRC += $(SRC_SYMTAB)
     26SRCDEMANGLE += $(SRC_SYMTAB) SymTab/Demangle.cc
  • src/SynTree/Type.h

    rf56c32e r0050a5f  
    208208  public:
    209209        // GENERATED START, DO NOT EDIT
    210         // GENERATED BY BasicTypes-gen.cc
     210        // GENERATED BY ../../main/src/BasicTypes-gen.cc
    211211        enum Kind {
    212212                Bool,
  • src/SynTree/module.mk

    rf56c32e r0050a5f  
    1515###############################################################################
    1616
    17 SRC += SynTree/Type.cc \
    18        SynTree/VoidType.cc \
    19        SynTree/BasicType.cc \
    20        SynTree/PointerType.cc \
    21        SynTree/ArrayType.cc \
    22        SynTree/ReferenceType.cc \
    23        SynTree/FunctionType.cc \
    24        SynTree/ReferenceToType.cc \
    25        SynTree/TupleType.cc \
    26        SynTree/TypeofType.cc \
    27        SynTree/AttrType.cc \
    28        SynTree/VarArgsType.cc \
    29        SynTree/ZeroOneType.cc \
    30        SynTree/Constant.cc \
    31        SynTree/Expression.cc \
    32        SynTree/TupleExpr.cc \
    33        SynTree/CommaExpr.cc \
    34        SynTree/TypeExpr.cc \
    35        SynTree/ApplicationExpr.cc \
    36        SynTree/AddressExpr.cc \
    37        SynTree/Statement.cc \
    38        SynTree/CompoundStmt.cc \
    39        SynTree/DeclStmt.cc \
    40        SynTree/Declaration.cc \
    41        SynTree/DeclarationWithType.cc \
    42        SynTree/ObjectDecl.cc \
    43        SynTree/FunctionDecl.cc \
    44        SynTree/AggregateDecl.cc \
    45        SynTree/NamedTypeDecl.cc \
    46        SynTree/TypeDecl.cc \
    47        SynTree/Initializer.cc \
    48        SynTree/TypeSubstitution.cc \
    49        SynTree/Attribute.cc \
    50        SynTree/DeclReplacer.cc
     17SRC_SYNTREE = \
     18      SynTree/Type.cc \
     19      SynTree/VoidType.cc \
     20      SynTree/BasicType.cc \
     21      SynTree/PointerType.cc \
     22      SynTree/ArrayType.cc \
     23      SynTree/ReferenceType.cc \
     24      SynTree/FunctionType.cc \
     25      SynTree/ReferenceToType.cc \
     26      SynTree/TupleType.cc \
     27      SynTree/TypeofType.cc \
     28      SynTree/AttrType.cc \
     29      SynTree/VarArgsType.cc \
     30      SynTree/ZeroOneType.cc \
     31      SynTree/Constant.cc \
     32      SynTree/Expression.cc \
     33      SynTree/TupleExpr.cc \
     34      SynTree/CommaExpr.cc \
     35      SynTree/TypeExpr.cc \
     36      SynTree/ApplicationExpr.cc \
     37      SynTree/AddressExpr.cc \
     38      SynTree/Statement.cc \
     39      SynTree/CompoundStmt.cc \
     40      SynTree/DeclStmt.cc \
     41      SynTree/Declaration.cc \
     42      SynTree/DeclarationWithType.cc \
     43      SynTree/ObjectDecl.cc \
     44      SynTree/FunctionDecl.cc \
     45      SynTree/AggregateDecl.cc \
     46      SynTree/NamedTypeDecl.cc \
     47      SynTree/TypeDecl.cc \
     48      SynTree/Initializer.cc \
     49      SynTree/TypeSubstitution.cc \
     50      SynTree/Attribute.cc \
     51      SynTree/DeclReplacer.cc
    5152
     53SRC += $(SRC_SYNTREE)
     54SRCDEMANGLE += $(SRC_SYNTREE)
  • src/Tuples/module.mk

    rf56c32e r0050a5f  
    1515###############################################################################
    1616
    17 SRC +=  Tuples/TupleAssignment.cc \
    18         Tuples/TupleExpansion.cc \
    19         Tuples/Explode.cc
     17SRC += Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc Tuples/Explode.cc
     18SRCDEMANGLE += Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc Tuples/Explode.cc
  • src/Validate/module.mk

    rf56c32e r0050a5f  
    1616
    1717SRC += Validate/HandleAttributes.cc
     18SRCDEMANGLE += Validate/HandleAttributes.cc
  • src/main.cc

    rf56c32e r0050a5f  
    3737#include "CodeTools/TrackLoc.h"             // for fillLocations
    3838#include "Common/CompilerError.h"           // for CompilerError
    39 #include "Common/Heap.h"
     39#include "Common/Stats.h"
    4040#include "Common/PassVisitor.h"
    4141#include "Common/SemanticError.h"           // for SemanticError
     
    6767#define PASS(name, pass)                   \
    6868        if ( errorp ) { cerr << name << endl; } \
    69         HeapStats::newPass(name);               \
     69        Stats::Heap::newPass(name);               \
    7070        pass;
    7171
     
    377377
    378378        deleteAll( translationUnit );
    379         if(!libcfap && !treep) HeapStats::printStats();
     379        if(!libcfap && !treep) {
     380                if(stats_counters) Stats::Counters::print();
     381                if(stats_heap) Stats::Heap::print();
     382        }
     383
    380384        return 0;
    381385} // main
    382386
    383387void parse_cmdline( int argc, char * argv[], const char *& filename ) {
    384         enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, PreludeDir, Prototypes, Resolver, ResolvProto, Symbol, Tree, TupleExpansion, Validate, };
     388        enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, PreludeDir, Prototypes, Resolver, ResolvProto, Stats, Symbol, Tree, TupleExpansion, Validate};
    385389
    386390        static struct option long_opts[] = {
     
    402406                { "resolver", no_argument, 0, Resolver },
    403407                { "resolv-proto", no_argument, 0, ResolvProto },
     408                { "stats", required_argument, 0, Stats },
    404409                { "symbol", no_argument, 0, Symbol },
    405410                { "tree", no_argument, 0, Tree },
     
    489494                  case 'R':                                                                             // dump resolv-proto instance
    490495                        resolvprotop = true;
     496                        break;
     497                  case Stats:
     498                        {
     499                                std::stringstream ss(optarg);
     500                                while(ss.good()) {
     501                                        std::string substr;
     502                                        getline( ss, substr, ',' );
     503                                        if(substr == "counters") {
     504                                                stats_counters = true;
     505                                        } else if(substr == "heap") {
     506                                                stats_heap = true;
     507                                        } else if(substr == "none") {
     508                                                stats_counters = false;
     509                                                stats_heap = false;
     510                                        } else {
     511                                                std::cerr << "Ignoring unknown statistic " << substr << std::endl;
     512                                        }
     513                                }
     514
     515                        }
    491516                        break;
    492517                  case Symbol:
Note: See TracChangeset for help on using the changeset viewer.