Ignore:
Timestamp:
Feb 15, 2017, 8:42:12 AM (5 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
32b8144
Parents:
97f65d5
Message:

generate tuples by arity to reduce the number of generated structs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/Generate.cc

    r97f65d5 re6512c8  
    2222#include "SynTree/Declaration.h"
    2323#include "CodeGenerator.h"
     24#include "Tuples/Tuples.h"
    2425
    2526using namespace std;
     
    2829        void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics, bool pretty ) {
    2930                CodeGen::CodeGenerator cgv( os, pretty );
    30 
    31                 for ( std::list<Declaration *>::iterator i = translationUnit.begin(); i != translationUnit.end();  i++ ) {
    32                         if ( LinkageSpec::isGeneratable( (*i)->get_linkage() ) && (doIntrinsics || ! LinkageSpec::isBuiltin( (*i)->get_linkage() ) ) ) {
    33                                 (*i)->accept(cgv);
    34                                 if ( doSemicolon( *i ) ) {
     31                for ( auto & dcl : translationUnit ) {
     32                        if ( LinkageSpec::isGeneratable( dcl->get_linkage() ) && (doIntrinsics || ! LinkageSpec::isBuiltin( dcl->get_linkage() ) ) ) {
     33                                dcl->accept(cgv);
     34                                if ( doSemicolon( dcl ) ) {
    3535                                        os << ";";
    3636                                } // if
Note: See TracChangeset for help on using the changeset viewer.