Skip to content

Commit e9a114a

Browse files
mi-acV8-internal LUCI CQ
authored andcommitted
[clean-up] Fix an assert in the DefUseAnalyzer
Bug: 465497343 Change-Id: Ic5371de6093189b8519c7491037acd38e2774a11 Reviewed-on: https://chrome-internal-review.googlesource.com/c/v8/fuzzilli/+/9027056 Commit-Queue: Michael Achenbach <machenbach@google.com> Reviewed-by: Dominik Klemba <tacet@google.com> Reviewed-by: Matthias Liedtke <mliedtke@google.com>
1 parent 6298076 commit e9a114a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Sources/Fuzzilli/FuzzIL/Analyzer.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ struct DefUseAnalyzer: Analyzer {
9595
return uses[variable]!.map({ code[$0] })
9696
}
9797

98-
/// Returns the indices of the instructions using the given variable.
98+
/// Returns the indices of the instructions assigning to the given variable.
9999
func assignmentIndices(of variable: Variable) -> [Int] {
100-
assert(uses.contains(variable))
100+
assert(assignments.contains(variable))
101101
return assignments[variable]!
102102
}
103103

@@ -107,7 +107,7 @@ struct DefUseAnalyzer: Analyzer {
107107
return uses[variable]!
108108
}
109109

110-
/// Returns the number of instructions using the given variable.
110+
/// Returns the number of instructions assigning to the given variable.
111111
func numAssignments(of variable: Variable) -> Int {
112112
assert(assignments.contains(variable))
113113
return assignments[variable]!.count

0 commit comments

Comments
 (0)