Changeset ba89e9b7


Ignore:
Timestamp:
Apr 10, 2018, 3:16:55 PM (6 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, with_gc
Children:
da7fe39
Parents:
207b496
Message:

Temporarily enable more debug information

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Lvalue.cc

    r207b496 rba89e9b7  
    1717#include <string>                        // for string
    1818
     19#include "Common/Debug.h"
    1920#include "Common/PassVisitor.h"
    2021#include "GenPoly.h"                     // for isPolyType
     
    123124                PassVisitor<AddrRef> addrRef;
    124125                PassVisitor<FixIntrinsicResult> intrinsicResults;
     126                Debug::codeGen( translationUnit, "begin" );
    125127                mutateAll( translationUnit, intrinsicResults );
     128                Debug::codeGen( translationUnit, "intrinsicResults" );
    126129                mutateAll( translationUnit, addrRef );
     130                Debug::codeGen( translationUnit, "addrRef" );
    127131                mutateAll( translationUnit, refCvt );
     132                Debug::codeGen( translationUnit, "refCvt" );
    128133                mutateAll( translationUnit, fixer );
     134                Debug::codeGen( translationUnit, "fixer" );
    129135                mutateAll( translationUnit, collapser );
     136                Debug::codeGen( translationUnit, "collapser" );
    130137                mutateAll( translationUnit, genLval );
     138                Debug::codeGen( translationUnit, "genLval" );
    131139                mutateAll( translationUnit, elim );  // last because other passes need reference types to work
     140                Debug::codeGen( translationUnit, "elim" );
    132141
    133142                // from this point forward, no other pass should create reference types.
     
    363372                                for ( int i = 0; i < diff; ++i ) {
    364373                                        ret = mkDeref( ret );
     374                                        // xxx - try removing one reference here? actually, looks like mkDeref already does this, so more closely look at the types generated.
    365375                                }
    366376                                if ( ! ResolvExpr::typesCompatibleIgnoreQualifiers( destType->stripReferences(), srcType->stripReferences(), SymTab::Indexer() ) ) {
  • src/InitTweak/InitTweak.cc

    r207b496 rba89e9b7  
    520520
    521521        ApplicationExpr * createBitwiseAssignment( Expression * dst, Expression * src ) {
     522                std::cerr << "=== createBitwiseAssignment ===" << std::endl;
     523                std::cerr << "== dst: " << dst << std::endl;
     524                std::cerr << "== src: " << src << std::endl;
     525
    522526                static FunctionDecl * assign = nullptr;
    523527                if ( ! assign ) {
     
    538542                                src = new AddressExpr( src );
    539543                        }
    540                 }
     544                        // src = new CastExpr( src, new ReferenceType( noQualifiers, src->result->stripReferences()->clone() ) );
     545                }
     546                std::cerr << "============= endl : " << std::endl;
     547                std::cerr << "-- dst: " << dst << std::endl;
     548                std::cerr << "-- src: " << src << std::endl;
    541549                return new ApplicationExpr( VariableExpr::functionPointer( assign ), { dst, src } );
    542550        }
  • src/ResolvExpr/CommonType.cc

    r207b496 rba89e9b7  
    2727#include "typeops.h"                     // for isFtype
    2828
    29 #define DEBUG
     29// #define DEBUG
    3030#ifdef DEBUG
    3131#define PRINT(x) x
     
    101101                        int diff = depth1-depth2;
    102102                        // TODO: should it be possible for commonType to generate complicated conversions? I would argue no, only conversions that involve types of the same reference level or a difference of 1 should be allowed.
    103                         if ( diff > 1 || diff < -1 ) return nullptr;
     103                        // if ( diff > 1 || diff < -1 ) return nullptr;
    104104
    105105                        // special case where one type has a reference depth of 1 larger than the other
Note: See TracChangeset for help on using the changeset viewer.