Flutter Engine
The Flutter Engine
splay-tree.h
Go to the documentation of this file.
1// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#ifndef RUNTIME_VM_SPLAY_TREE_H_
6#define RUNTIME_VM_SPLAY_TREE_H_
7
9#include "vm/zone.h"
10
11namespace dart {
12
13// A zone splay tree. The config type parameter encapsulates the
14// different configurations of a concrete splay tree (see
15// platform/splay-tree.h). The tree itself and all its elements are allocated
16// in the Zone.
17template <typename Config>
18class ZoneSplayTree final : public SplayTree<Config, ZoneAllocated, Zone> {
19 public:
20 explicit ZoneSplayTree(Zone* zone)
23 // Reset the root to avoid unneeded iteration over all tree nodes
24 // in the destructor. For a zone-allocated tree, nodes will be
25 // freed by the Zone.
27 }
28};
29
30} // namespace dart
31
32#endif // RUNTIME_VM_SPLAY_TREE_H_
#define ASSERT_NOTNULL(ptr)
Definition: assert.h:323
void ResetRoot()
Definition: splay-tree.h:125
ZoneSplayTree(Zone *zone)
Definition: splay-tree.h:20
Definition: dart_vm.cc:33