this repo has no description
1/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 3/* 4 * Main authors: 5 * Jip J. Dekker <jip.dekker@monash.edu> 6 * Guido Tack <guido.tack@monash.edu> 7 */ 8 9/* This Source Code Form is subject to the terms of the Mozilla Public 10 * License, v. 2.0. If a copy of the MPL was not distributed with this 11 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 12 13#include <minizinc/astmap.hh> 14 15namespace MiniZinc { 16 17template <> 18void ManagedASTStringMap<Expression*>::mark(MINIZINC_GC_STAT_ARGS) { 19 for (auto& it : *this) { 20 it.first.mark(); 21 Expression::mark(it.second); 22#if defined(MINIZINC_GC_STATS) 23 gc_stats[it->second->_id].keepalive++; 24#endif 25 } 26}; 27 28template <> 29void ManagedASTStringMap<VarDeclI*>::mark(MINIZINC_GC_STAT_ARGS) { 30 for (auto& it : *this) { 31 it.first.mark(); 32#if defined(MINIZINC_GC_STATS) 33 gc_stats[it.second->e()->Expression::eid()].keepalive++; 34 Item::mark(it.second, gc_stats); 35#else 36 Item::mark(it.second); 37#endif 38 } 39}; 40 41} // namespace MiniZinc