Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r68cd1ce r843054c2  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jun 13 07:13:46 2015
    13 // Update Count     : 3
     12// Last Modified On : Tue May 19 07:31:41 2015
     13// Update Count     : 1
    1414//
    1515
     
    2626#include "ScrubTyVars.h"
    2727
    28 #include "Parser/ParseNode.h"
    29 
     28#include "SynTree/Declaration.h"
    3029#include "SynTree/Type.h"
    3130#include "SynTree/Expression.h"
     
    3332#include "SynTree/Statement.h"
    3433#include "SynTree/Mutator.h"
    35 
    3634#include "ResolvExpr/TypeEnvironment.h"
    37 
    3835#include "SymTab/Mangler.h"
    3936
     
    285282
    286283                ObjectDecl *Pass1::makeTemporary( Type *type ) {
    287                         ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), DeclarationNode::NoStorageClass, LinkageSpec::C, 0, type, 0 );
     284                        ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), Declaration::NoStorageClass, LinkageSpec::C, 0, type, 0 );
    288285                        stmtsToAdd.push_back( new DeclStmt( noLabels, newObj ) );
    289286                        return newObj;
     
    365362                                        arg = new AddressExpr( arg );
    366363                                } else {
    367                                         ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), DeclarationNode::NoStorageClass, LinkageSpec::C, 0, arg->get_results().front()->clone(), 0 );
     364                                        ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), Declaration::NoStorageClass, LinkageSpec::C, 0, arg->get_results().front()->clone(), 0 );
    368365                                        newObj->get_type()->get_qualifiers() = Type::Qualifiers();
    369366                                        stmtsToAdd.push_back( new DeclStmt( noLabels, newObj ) );
     
    436433                                makeRetParm( adapter );
    437434                        } // if
    438                         adapter->get_parameters().push_front( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ), 0 ) );
     435                        adapter->get_parameters().push_front( new ObjectDecl( "", Declaration::NoStorageClass, LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ), 0 ) );
    439436                        return adapter;
    440437                }
     
    524521                        adapterBody->get_kids().push_back( bodyStmt );
    525522                        std::string adapterName = makeAdapterName( mangleName );
    526                         return new FunctionDecl( adapterName, DeclarationNode::NoStorageClass, LinkageSpec::C, adapterType, adapterBody, false );
     523                        return new FunctionDecl( adapterName, Declaration::NoStorageClass, LinkageSpec::C, adapterType, adapterBody, false );
    527524                }
    528525
     
    905902                                if ( adaptersDone.find( mangleName ) == adaptersDone.end() ) {
    906903                                        std::string adapterName = makeAdapterName( mangleName );
    907                                         paramList.push_front( new ObjectDecl( adapterName, DeclarationNode::NoStorageClass, LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), makeAdapterType( *funType, scopeTyVars ) ), 0 ) );
     904                                        paramList.push_front( new ObjectDecl( adapterName, Declaration::NoStorageClass, LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), makeAdapterType( *funType, scopeTyVars ) ), 0 ) );
    908905                                        adaptersDone.insert( adaptersDone.begin(), mangleName );
    909906                                }
     
    964961                        std::list< DeclarationWithType *>::iterator last = funcType->get_parameters().begin();
    965962                        std::list< DeclarationWithType *> inferredParams;
    966                         ObjectDecl *newObj = new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::C, 0, new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), 0 );
    967 ///   ObjectDecl *newFunPtr = new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ), 0 );
     963                        ObjectDecl *newObj = new ObjectDecl( "", Declaration::NoStorageClass, LinkageSpec::C, 0, new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), 0 );
     964///   ObjectDecl *newFunPtr = new ObjectDecl( "", Declaration::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ), 0 );
    968965                        for ( std::list< TypeDecl *>::const_iterator tyParm = funcType->get_forall().begin(); tyParm != funcType->get_forall().end(); ++tyParm ) {
    969966                                ObjectDecl *thisParm;
Note: See TracChangeset for help on using the changeset viewer.