Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- Add `MastForest::write_stripped()` to serialize without `DebugInfo` ([#2549](https://github.com/0xMiden/miden-vm/pull/2549)).
- [BREAKING] Rename `MastForest::strip_decorators()` to `MastForest::clear_debug_info()` ([#2554](https://github.com/0xMiden/miden-vm/pull/2554)).

- Use `IndexVec::try_from` instead of pushing elements one by one in `DebugInfo::empty_for_nodes` ([#2559](https://github.com/0xMiden/miden-vm/pull/2559)).
## 0.20.2 (TBD)
- Fix issue where decorator access was not bypassed properly in release mode ([#2529](https://github.com/0xMiden/miden-vm/pull/2529)).

Expand Down
6 changes: 2 additions & 4 deletions core/src/mast/debuginfo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,8 @@ impl DebugInfo {

/// Creates an empty [DebugInfo] with valid CSR structures for N nodes.
pub fn empty_for_nodes(num_nodes: usize) -> Self {
let mut node_indptr_for_op_idx = IndexVec::new();
for _ in 0..=num_nodes {
let _ = node_indptr_for_op_idx.push(0);
}
let node_indptr_for_op_idx = IndexVec::try_from(vec![0; num_nodes + 1])
.expect("num_nodes should not exceed u32::MAX");

let op_decorator_storage =
OpToDecoratorIds::from_components(Vec::new(), Vec::new(), node_indptr_for_op_idx)
Expand Down