Changeset 5f2f2d7 for src/ResolvExpr


Ignore:
Timestamp:
Jun 8, 2015, 8:56:35 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
81419b5
Parents:
cd623a4
Message:

fix constant types, remove unnecessary string copying, work on regression testing, fix several memory leaks

Location:
src/ResolvExpr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AlternativeFinder.cc

    rcd623a4 r5f2f2d7  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sat May 16 23:52:08 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu May 21 16:21:09 2015
    13 // Update Count     : 12
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Jun  8 14:53:58 2015
     13// Update Count     : 14
    1414//
    1515
     
    209209                pruneAlternatives( alternatives.begin(), alternatives.end(), front_inserter( alternatives ), indexer );
    210210                if ( alternatives.begin() == oldBegin ) {
    211                         std::ostrstream stream;
     211                        std::ostringstream stream;
    212212                        stream << "Can't choose between alternatives for expression ";
    213213                        expr->print( stream );
     
    216216                        findMinCost( alternatives.begin(), alternatives.end(), back_inserter( winners ) );
    217217                        printAlts( winners, stream, 8 );
    218                         throw SemanticError( std::string( stream.str(), stream.pcount() ) );
     218                        throw SemanticError( stream.str() );
    219219                }
    220220                alternatives.erase( oldBegin, alternatives.end() );
  • src/ResolvExpr/RenameVars.cc

    rcd623a4 r5f2f2d7  
    1010// Created On       : Sun May 17 12:05:18 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 12:07:59 2015
    13 // Update Count     : 2
     12// Last Modified On : Mon Jun  8 14:51:35 2015
     13// Update Count     : 4
    1414//
    1515
    16 #include <strstream>
     16#include <sstream>
    1717
    1818#include "RenameVars.h"
     
    120120                        mapStack.push_front( mapStack.front() );
    121121                        for ( std::list< TypeDecl* >::iterator i = type->get_forall().begin(); i != type->get_forall().end(); ++i ) {
    122                                 std::ostrstream output;
     122                                std::ostringstream output;
    123123                                output << "_" << level << "_" << (*i)->get_name();
    124                                 std::string newname( output.str(), output.pcount() );
     124                                std::string newname( output.str() );
    125125                                mapStack.front()[ (*i)->get_name() ] = newname;
    126126                                (*i)->set_name( newname );
  • src/ResolvExpr/Resolver.cc

    rcd623a4 r5f2f2d7  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 12:17:01 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Jun 01 13:47:16 2015
    13 // Update Count     : 21
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun Jun  7 21:50:37 2015
     13// Update Count     : 23
    1414//
    1515
Note: See TracChangeset for help on using the changeset viewer.