Changeset 3b3491b


Ignore:
Timestamp:
Sep 12, 2018, 4:59:56 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
b181639
Parents:
67982887
Message:

Add first draft of resolver prototype dumper

Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • libcfa/configure

    r67982887 r3b3491b  
    19591959
    19601960
     1961
    19611962am__api_version='1.15'
    19621963
  • src/CodeTools/module.mk

    r67982887 r3b3491b  
    1616
    1717SRC += CodeTools/DeclStats.cc \
     18        CodeTools/ResolvProtoDump.cc \
    1819        CodeTools/TrackLoc.cc
  • src/CompilationState.cc

    r67982887 r3b3491b  
    3030        parsep = false,
    3131        resolvep = false,
     32        resolvprotop = false,
    3233        symtabp = false,
    3334        treep = false,
  • src/CompilationState.h

    r67982887 r3b3491b  
    3131        parsep,
    3232        resolvep,
     33        resolvprotop,
    3334        symtabp,
    3435        treep,
  • src/Makefile.in

    r67982887 r3b3491b  
    221221        CodeGen/FixNames.$(OBJEXT) CodeGen/FixMain.$(OBJEXT) \
    222222        CodeGen/OperatorTable.$(OBJEXT) CodeTools/DeclStats.$(OBJEXT) \
     223        CodeTools/ResolvProtoDump.$(OBJEXT) \
    223224        CodeTools/TrackLoc.$(OBJEXT) Concurrency/Keywords.$(OBJEXT) \
    224225        Concurrency/Waitfor.$(OBJEXT) Common/SemanticError.$(OBJEXT) \
     
    520521        CodeGen/FixNames.cc CodeGen/FixMain.cc \
    521522        CodeGen/OperatorTable.cc CodeTools/DeclStats.cc \
    522         CodeTools/TrackLoc.cc Concurrency/Keywords.cc \
    523         Concurrency/Waitfor.cc Common/SemanticError.cc \
    524         Common/UniqueName.cc Common/DebugMalloc.cc Common/Assert.cc \
    525         Common/Heap.cc Common/Eval.cc ControlStruct/LabelGenerator.cc \
     523        CodeTools/ResolvProtoDump.cc CodeTools/TrackLoc.cc \
     524        Concurrency/Keywords.cc Concurrency/Waitfor.cc \
     525        Common/SemanticError.cc Common/UniqueName.cc \
     526        Common/DebugMalloc.cc Common/Assert.cc Common/Heap.cc \
     527        Common/Eval.cc ControlStruct/LabelGenerator.cc \
    526528        ControlStruct/LabelFixer.cc ControlStruct/MLEMutator.cc \
    527529        ControlStruct/Mutate.cc ControlStruct/ForExprMutator.cc \
     
    9991001CodeTools/DeclStats.$(OBJEXT): CodeTools/$(am__dirstamp) \
    10001002        CodeTools/$(DEPDIR)/$(am__dirstamp)
     1003CodeTools/ResolvProtoDump.$(OBJEXT): CodeTools/$(am__dirstamp) \
     1004        CodeTools/$(DEPDIR)/$(am__dirstamp)
    10011005CodeTools/TrackLoc.$(OBJEXT): CodeTools/$(am__dirstamp) \
    10021006        CodeTools/$(DEPDIR)/$(am__dirstamp)
     
    11011105@AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/OperatorTable.Po@am__quote@
    11021106@AMDEP_TRUE@@am__include@ @am__quote@CodeTools/$(DEPDIR)/DeclStats.Po@am__quote@
     1107@AMDEP_TRUE@@am__include@ @am__quote@CodeTools/$(DEPDIR)/ResolvProtoDump.Po@am__quote@
    11031108@AMDEP_TRUE@@am__include@ @am__quote@CodeTools/$(DEPDIR)/TrackLoc.Po@am__quote@
    11041109@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/Assert.Po@am__quote@
  • src/main.cc

    r67982887 r3b3491b  
    3434#include "CodeGen/Generate.h"               // for generate
    3535#include "CodeTools/DeclStats.h"            // for printDeclStats
     36#include "CodeTools/ResolvProtoDump.h"      // for dumpAsResolvProto
    3637#include "CodeTools/TrackLoc.h"             // for fillLocations
    3738#include "Common/CompilerError.h"           // for CompilerError
     
    271272                CodeTools::fillLocations( translationUnit );
    272273
     274                if ( resolvprotop ) {
     275                        CodeTools::dumpAsResolvProto( translationUnit );
     276                        return 0;
     277                }
     278
    273279                PASS( "resolve", ResolvExpr::resolve( translationUnit ) );
    274280                if ( exprp ) {
     
    376382
    377383void parse_cmdline( int argc, char * argv[], const char *& filename ) {
    378         enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, PreludeDir, Prototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, };
     384        enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, PreludeDir, Prototypes, Resolver, ResolvProto, Symbol, Tree, TupleExpansion, Validate, };
    379385
    380386        static struct option long_opts[] = {
     
    395401                { "no-prototypes", no_argument, 0, Prototypes },
    396402                { "resolver", no_argument, 0, Resolver },
     403                { "resolv-proto", no_argument, 0, ResolvProto },
    397404                { "symbol", no_argument, 0, Symbol },
    398405                { "tree", no_argument, 0, Tree },
     
    407414        bool Wsuppress = false, Werror = false;
    408415        int c;
    409         while ( (c = getopt_long( argc, argv, "abBcCdefgGlLmnNpqrstTvwW:yzZD:F:", long_opts, &long_index )) != -1 ) {
     416        while ( (c = getopt_long( argc, argv, "abBcCdefgGlLmnNpqrRstTvwW:yzZD:F:", long_opts, &long_index )) != -1 ) {
    410417                switch ( c ) {
    411418                  case Ast:
     
    479486                  case 'r':                                                                             // print resolver steps
    480487                        resolvep = true;
     488                        break;
     489                        case 'R':                                                                               // dump resolv-proto instance
     490                        resolvprotop = true;
    481491                        break;
    482492                  case Symbol:
Note: See TracChangeset for help on using the changeset viewer.