Changeset 7e4b44db


Ignore:
Timestamp:
Mar 22, 2018, 1:20:29 PM (7 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env, with_gc
Children:
bd06384
Parents:
8d7bef2
Message:

Make Constant no longer BaseSyntaxNode?

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Common/GC.cc

    r8d7bef2 r7e4b44db  
    1717
    1818#include <algorithm>
     19#include <cassert>
    1920
    2021GC& GC::get() {
     
    101102}
    102103
     104bool stack_check( int* i, GC_Object* o ) {
     105        int j;
     106        return ( i < &j ) == ( (void*)o < (void*)&j );
     107}
     108
    103109GC_Object::GC_Object() {
    104110        GC::get().register_object( this );
     111
     112        int i;
     113        assert(!stack_check(&i, this));
    105114}
    106115
  • src/Common/PassVisitor.h

    r8d7bef2 r7e4b44db  
    148148        virtual void visit( Subrange * subrange ) override final;
    149149
    150         virtual void visit( Constant * constant ) override final;
     150        virtual void visit( Constant * constant ) final;
    151151
    152152        virtual void visit( Attribute * attribute ) override final;
     
    245245        virtual Subrange * mutate( Subrange * subrange ) override final;
    246246
    247         virtual Constant * mutate( Constant * constant ) override final;
     247        virtual Constant * mutate( Constant * constant ) final;
    248248
    249249        virtual Attribute * mutate( Attribute * attribute ) override final;
  • src/SynTree/Constant.h

    r8d7bef2 r7e4b44db  
    1919#include <string>     // for string
    2020
    21 #include "BaseSyntaxNode.h"
    2221#include "Mutator.h"  // for Mutator
    2322#include "Visitor.h"  // for Visitor
    2423
     24#include "Common/Indenter.h"  // for Indenter
     25
    2526class Type;
    2627
    27 class Constant : public BaseSyntaxNode {
     28class Constant {
    2829  public:
    2930        Constant( Type * type, std::string rep, unsigned long long val );
Note: See TracChangeset for help on using the changeset viewer.