1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Node: `cxx:Record:Luau.Repl.CLI:CLI/src/Counters.cpp:19:function_counters`
//! Source: `CLI/src/Counters.cpp`
//! Graph edges:
//! - declared_by: source_file CLI/src/Counters.cpp
//! - source_includes:
//! - includes -> source_file CLI/include/Luau/Counters.h
//! - includes -> source_file CodeGen/include/Luau/CodeGenOptions.h
//! - includes -> source_file Common/include/Luau/DenseHash.h
//! - includes -> source_file VM/include/lua.h
//! - incoming:
//! - declares <- source_file CLI/src/Counters.cpp
//! - type_ref <- record ModuleCounters (CLI/src/Counters.cpp)
//! - type_ref <- function countersValueCallback (CLI/src/Counters.cpp)
//! - type_ref <- function countersDump (CLI/src/Counters.cpp)
//! - outgoing:
//! - type_ref -> record DenseHashMap (Common/include/Luau/DenseHash.h)
//! - type_ref -> record LineCounters (CLI/src/Counters.cpp)
//! - translates_to -> rust_item FunctionCounters
use BTreeMap;
use String;
use crateLineCounters;
// Faithful port of Counters.cpp's:
// struct FunctionCounters {
// std::string name;
// Luau::DenseHashMap<int, LineCounters> counters{-1};
// };
// The C++ DenseHashMap is keyed by line number and later sorted by line for
// output; a BTreeMap captures the same line→LineCounters mapping in sorted
// order, so counters_dump can iterate it directly.