Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Unify.h

    rc6b4432 r251ce80  
    2020#include "AST/Node.hpp"             // for ptr
    2121#include "AST/TypeEnvironment.hpp"  // for TypeEnvironment, AssertionSet, OpenVarSet
     22#include "Common/utility.h"       // for deleteAll
     23#include "SynTree/Declaration.h"  // for TypeDecl, TypeDecl::Data
     24#include "TypeEnvironment.h"      // for AssertionSet, OpenVarSet
    2225#include "WidenMode.h"              // for WidenMode
     26
     27class Type;
     28class TypeInstType;
     29namespace SymTab {
     30        class Indexer;
     31}
    2332
    2433namespace ast {
     
    2837
    2938namespace ResolvExpr {
     39
     40bool unify( Type *type1, Type *type2, TypeEnvironment &env, AssertionSet &needAssertions, AssertionSet &haveAssertions, OpenVarSet &openVars, const SymTab::Indexer &indexer );
     41bool unify( Type *type1, Type *type2, TypeEnvironment &env, AssertionSet &needAssertions, AssertionSet &haveAssertions, OpenVarSet &openVars, const SymTab::Indexer &indexer, Type *&commonType );
     42bool unifyExact( Type *type1, Type *type2, TypeEnvironment &env, AssertionSet &needAssertions, AssertionSet &haveAssertions, OpenVarSet &openVars, const SymTab::Indexer &indexer );
     43bool unifyInexact( Type *type1, Type *type2, TypeEnvironment &env, AssertionSet &needAssertions, AssertionSet &haveAssertions, const OpenVarSet &openVars, WidenMode widen, const SymTab::Indexer &indexer, Type *&common );
     44
     45bool typesCompatible( const Type *, const Type *, const SymTab::Indexer & indexer, const TypeEnvironment & env );
     46bool typesCompatibleIgnoreQualifiers( const Type *, const Type *, const SymTab::Indexer & indexer, const TypeEnvironment & env );
     47
     48inline bool typesCompatible( const Type * t1, const Type * t2, const SymTab::Indexer & indexer ) {
     49        TypeEnvironment env;
     50        return typesCompatible( t1, t2, indexer, env );
     51}
     52
     53inline bool typesCompatibleIgnoreQualifiers( const Type * t1, const Type * t2, const SymTab::Indexer & indexer ) {
     54        TypeEnvironment env;
     55        return typesCompatibleIgnoreQualifiers( t1, t2, indexer, env );
     56}
    3057
    3158bool unify(
     
    5885        const ast::TypeEnvironment & env = {} );
    5986
     87/// Creates the type represented by the list of returnVals in a FunctionType.
     88/// The caller owns the return value.
     89Type * extractResultType( FunctionType * functionType );
    6090/// Creates or extracts the type represented by returns in a `FunctionType`.
    6191ast::ptr<ast::Type> extractResultType( const ast::FunctionType * func );
Note: See TracChangeset for help on using the changeset viewer.