Ignore:
Timestamp:
Nov 29, 2016, 3:30:59 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
8e5724e
Parents:
3a2128f (diff), 9129a84 (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 plg2:software/cfa/cfa-cc

Conflicts:

src/Parser/parser.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Alternative.cc

    r3a2128f r1f44196  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Alternative.cc -- 
     7// Alternative.cc --
    88//
    99// Author           : Richard C. Bilson
     
    1212// Last Modified On : Sat May 16 23:54:23 2015
    1313// Update Count     : 2
    14 // 
     14//
    1515
    1616#include "Alternative.h"
     
    2020
    2121namespace ResolvExpr {
    22         Alternative::Alternative() : expr( 0 ) {}
     22        Alternative::Alternative() : cost( Cost::zero ), cvtCost( Cost::zero ), expr( 0 ) {}
    2323
    2424        Alternative::Alternative( Expression *expr, const TypeEnvironment &env, const Cost& cost )
     
    3535                if ( &other == this ) return *this;
    3636                initialize( other, *this );
     37                return *this;
     38        }
     39
     40        Alternative::Alternative( Alternative && other ) : cost( other.cost ), cvtCost( other.cvtCost ), expr( other.expr ), env( other.env ) {
     41                other.expr = nullptr;
     42        }
     43
     44        Alternative & Alternative::operator=( Alternative && other ) {
     45                if ( &other == this )  return *this;
     46                delete expr;
     47                cost = other.cost;
     48                cvtCost = other.cvtCost;
     49                expr = other.expr;
     50                env = other.env;
     51                other.expr = nullptr;
    3752                return *this;
    3853        }
     
    5469                        expr->print( os, indent );
    5570                        os << "(types:" << std::endl;
    56                         printAll( expr->get_results(), os, indent + 4 );
    57                         os << ")" << std::endl;
     71                        os << std::string( indent+4, ' ' );
     72                        expr->get_result()->print( os, indent + 4 );
     73                        os << std::endl << ")" << std::endl;
    5874                } else {
    5975                        os << "Null expression!" << std::endl;
Note: See TracChangeset for help on using the changeset viewer.