Changeset 09a1ae6


Ignore:
Timestamp:
Apr 12, 2018, 11:57:51 AM (4 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env, with_gc
Children:
f229fc2
Parents:
34dcc474
Message:

Fix some missing static roots -- GC'd CFA-CC now builds prelude

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.impl.h

    r34dcc474 r09a1ae6  
    11711171        indexerScopedAccept( node->result, *this );
    11721172
     1173        // xxx - not quite sure why this doesn't visit( node->function );
    11731174        for ( auto expr : node->args ) {
    11741175                visitExpression( expr );
  • src/InitTweak/InitTweak.cc

    r34dcc474 r09a1ae6  
    55#include <memory>                  // for __shared_ptr
    66
     7#include "Common/GC.h"             // for new_static_root
    78#include "Common/PassVisitor.h"
    89#include "Common/SemanticError.h"  // for SemanticError
     
    523524                        // This operator could easily exist as a real function, but it's tricky because nothing should resolve to this function.
    524525                        TypeDecl * td = new TypeDecl( "T", noStorageClasses, nullptr, TypeDecl::Dtype, true );
    525                         assign = new FunctionDecl( "?=?", noStorageClasses, LinkageSpec::Intrinsic, SymTab::genAssignType( new TypeInstType( noQualifiers, td->name, td ) ), nullptr );
     526                        assign = new_static_root<FunctionDecl>(
     527                                "?=?", noStorageClasses, LinkageSpec::Intrinsic,
     528                                SymTab::genAssignType( new TypeInstType( noQualifiers, td->name, td ) ), nullptr );
    526529                }
    527530                if ( dynamic_cast< ReferenceType * >( dst->result ) ) {
  • src/ResolvExpr/AlternativeFinder.cc

    r34dcc474 r09a1ae6  
    3535#include "ResolveTypeof.h"         // for resolveTypeof
    3636#include "Resolver.h"              // for resolveStmtExpr
     37#include "Common/GC.h"             // for new_static_root
    3738#include "SymTab/Indexer.h"        // for Indexer
    3839#include "SymTab/Mangler.h"        // for Mangler
     
    10841085
    10851086                // find function operators
    1086                 static NameExpr *opExpr = new NameExpr( "?()" );
     1087                static auto *opExpr = new_static_root<NameExpr>( "?()" );
    10871088                AlternativeFinder funcOpFinder( indexer, env );
    10881089                // it's ok if there aren't any defined function ops
Note: See TracChangeset for help on using the changeset viewer.