Ignore:
Timestamp:
Apr 23, 2018, 4:46:43 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env, with_gc
Children:
2efe4b8
Parents:
fb97252f
Message:

Assorted bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ConversionCost.cc

    rfb97252f r5af7306  
    2020#include <string>                        // for operator==, string
    2121
     22#include "Common/GC.h"                   // for new_static_root
    2223#include "ResolvExpr/Cost.h"             // for Cost
    2324#include "ResolvExpr/TypeEnvironment.h"  // for EqvClass, TypeEnvironment
     
    353354        void ConversionCost::postvisit( EnumInstType * ) {
    354355                static Type::Qualifiers q;
    355                 static BasicType integer( q, BasicType::SignedInt );
    356                 cost = costFunc( &integer, dest, indexer, env );  // safe if dest >= int
     356                static BasicType* integer = new_static_root<BasicType>( q, BasicType::SignedInt );
     357                cost = costFunc( integer, dest, indexer, env );  // safe if dest >= int
    357358                if ( cost < Cost::unsafe ) {
    358359                        cost.incSafe();
Note: See TracChangeset for help on using the changeset viewer.