Ignore:
Timestamp:
Sep 15, 2016, 10:29:43 AM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
fc4a0fa, fd782b2
Parents:
96a10cd (diff), 50c5cf3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

Conflicts:

src/Parser/parser.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/examples/gc_no_raii/src/internal/state.c

    r96a10cd r1eba452  
    2121void gc_state_calc_usage(gc_state *const this);
    2222
    23 #if DEBUG
     23#ifndef NDEBUG
    2424        bool gc_state_roots_match(gc_state *const this);
    2525        bool gc_state_no_from_space_ref(gc_state *const this);
     
    7676gc_object_header* gc_get_object_for_ref(gc_state* state, void* member)
    7777{
     78        volatile int stage = 0;
    7879        intptr_t target = ((intptr_t)member);
    7980        if(!gc_is_in_heap(state, member)) return NULL;
     81        stage++;
    8082
    8183        gc_memory_pool* pool = gc_pool_of(member);
     84        stage++;
    8285        gc_pool_object_iterator it = gc_pool_iterator_for(pool, member);
     86        stage++;
    8387        gc_pool_object_iterator end = end(pool);
     88        stage++;
    8489
    8590        while(it != end)
    8691        {
    8792                gc_object_header* object = *it;
     93                check(object);
     94                check( is_valid(object) );
    8895                {
    8996                        intptr_t start = ((intptr_t)object);
     
    94101                        }
    95102                }
     103                stage++;
    96104                ++it;
    97105        }
    98106
    99         checkf(false, "is_in_heap() and iterator_for() return inconsistent data");
     107        checkf( (int) 0, "is_in_heap() and iterator_for() return inconsistent data");
    100108        abort();
    101109        return NULL;
     
    176184        this->from_code = (~this->from_code) & 0x01;
    177185
    178         #if _DEBUG
     186        #ifndef NDEBUG
    179187                {
    180188                        gc_memory_pool* pool = this->from_space;
     
    251259}
    252260
    253 #if _DEBUG
     261#ifndef NDEBUG
    254262        bool gc_state_roots_match(gc_state* const this)
    255263        {
     
    265273                                size += object->size;
    266274
    267                                 gcpointer_base* ptr = object->root_chain;
     275                                gcpointer_t* ptr = object->root_chain;
    268276                                while(ptr)
    269277                                {
    270                                         check(get_object_ptr(ptr->m_ptr) == object);
    271                                         ptr = ptr->m_next;
     278                                        check(gc_get_object_ptr( (void*)ptr->ptr ) == object);
     279                                        ptr = ptr->next;
    272280                                }
    273281                        }
    274282
    275                         check(size + gc_pool_size_used(pool) == gc_pool_size_total(pool));
     283                        checkf(size + gc_pool_size_left(pool) == gc_pool_size_total(pool),
     284                                (const char*)"expected %lu + %lu == %lu\n",
     285                                (size_t)size,
     286                                (size_t)gc_pool_size_left(pool),
     287                                (size_t)gc_pool_size_total(pool));
    276288
    277289                        pool = pool->next;
     
    286298                while(pool)
    287299                {
    288                         void** potential_ref = (void**)pool->m_start;
    289                         while(potential_ref < (void**)pool->m_free)
     300                        void** potential_ref = (void**)pool->start_p;
     301                        while(potential_ref < (void**)pool->free_p)
    290302                        {
    291303                                check(!gc_is_in_heap(this, *potential_ref));
Note: See TracChangeset for help on using the changeset viewer.