Skip to content

Commit

Permalink
[FIXUP] Fix badly indented list
Browse files Browse the repository at this point in the history
  • Loading branch information
cameel committed Nov 2, 2023
1 parent 85e7f23 commit ce85597
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/internals/optimizer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1427,14 +1427,14 @@ The condition and the fact that the counter variable is only ever incremented
guarantee that it never overflows.
The precise requirements for the loop to be eligible for the optimization are as follows:

- The loop condition is a comparison of the form ``i < Y``, for a local counter variable ``i`` and an expression ``Y``.
- The built-in operator ``<`` is necessarily used in the loop condition. User-defined operators are **not** eligible.
- The loop expression is a prefix or postfix increment of the counter variable, i.e, ``i++`` or ``++i``.
- The loop counter is a local declared variable of a built-in integer type.
- The loop counter is **not** modified by the loop body or by the expression used as the loop condition.
- The comparison is performed on the same type as the loop counter, meaning that the type of the
right-hand-side expression is implicitly convertible to the type of the counter, such that the latter
is not implicitly widened before comparing.
- The loop condition is a comparison of the form ``i < Y``, for a local counter variable ``i`` and an expression ``Y``.
- The built-in operator ``<`` is necessarily used in the loop condition. User-defined operators are **not** eligible.
- The loop expression is a prefix or postfix increment of the counter variable, i.e, ``i++`` or ``++i``.
- The loop counter is a local declared variable of a built-in integer type.
- The loop counter is **not** modified by the loop body or by the expression used as the loop condition.
- The comparison is performed on the same type as the loop counter, meaning that the type of the
right-hand-side expression is implicitly convertible to the type of the counter, such that the latter
is not implicitly widened before comparing.

To clarify the last condition, consider the following example:

Expand Down

0 comments on commit ce85597

Please sign in to comment.