void streamer_tree_cache_append (struct streamer_tree_cache_d *cache, tree t, hashval_t hash) { unsigned ix = cache->next_idx++; if (!cache->node_map) streamer_tree_cache_add_to_node_array (cache, ix, t, hash); else streamer_tree_cache_insert_1 (cache, t, hash, &ix, false); }
void streamer_tree_cache_replace_tree (struct streamer_tree_cache_d *cache, tree t, unsigned ix) { hashval_t hash = 0; if (cache->hashes.exists ()) hash = streamer_tree_cache_get_hash (cache, ix); if (!cache->node_map) streamer_tree_cache_add_to_node_array (cache, ix, t, hash); else streamer_tree_cache_insert_1 (cache, t, hash, &ix, false); }
void streamer_tree_cache_append (struct streamer_tree_cache_d *cache, tree t) { unsigned ix = VEC_length (tree, cache->nodes); streamer_tree_cache_insert_1 (cache, t, &ix, false); }
bool streamer_tree_cache_insert (struct streamer_tree_cache_d *cache, tree t, hashval_t hash, unsigned *ix_p) { return streamer_tree_cache_insert_1 (cache, t, hash, ix_p, true); }
bool streamer_tree_cache_insert_at (struct streamer_tree_cache_d *cache, tree t, unsigned ix) { return streamer_tree_cache_insert_1 (cache, t, &ix, false); }