Ignore:
Timestamp:
Nov 25, 2017, 3:22:18 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
c6e2c18
Parents:
9d06142 (diff), 3de176d (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' into cleanup-dtors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Alternative.h

    r9d06142 rc0d00b6  
    1717
    1818#include <iosfwd>             // for ostream
    19 #include <list>               // for list
     19#include <vector>             // for vector
    2020
    2121#include "Cost.h"             // for Cost
     
    2525
    2626namespace ResolvExpr {
    27         struct Alternative;
    28 
    29         typedef std::list< Alternative > AltList;
    30 
    3127        struct Alternative {
    3228                Alternative();
     
    4137                void print( std::ostream &os, Indenter indent = {} ) const;
    4238
     39                /// Returns the stored expression, but released from management of this Alternative
     40                Expression* release_expr() {
     41                        Expression* tmp = expr;
     42                        expr = nullptr;
     43                        return tmp;
     44                }
     45
    4346                Cost cost;
    4447                Cost cvtCost;
     
    4649                TypeEnvironment env;
    4750        };
     51
     52        typedef std::vector< Alternative > AltList;
     53
     54        /// Moves all elements from src to the end of dst
     55        void splice( AltList& dst, AltList& src );
     56
     57        /// Moves all elements from src to the beginning of dst
     58        void spliceBegin( AltList& dst, AltList& src );
    4859} // namespace ResolvExpr
    4960
Note: See TracChangeset for help on using the changeset viewer.