Skip to content

Commit e99864d

Browse files
Update ll_builder.py
1 parent 613f644 commit e99864d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypyc/irbuild/ll_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,7 @@ def is_string_literal(value: Value) -> TypeGuard[LoadLiteral]:
15591559
if op == "==":
15601560
if is_string_literal(lhs):
15611561
if is_string_literal(rhs):
1562-
# we can optimize out the check entirely in some Final cases
1562+
# we can optimize out the check entirely in some constant-folded cases
15631563
return self.true() if lhs.value == rhs.value else self.false()
15641564
literal_length = Integer(len(lhs.value), c_pyssize_t_rprimitive, line) # type: ignore [arg-type]
15651565
return self.primitive_op(str_eq_literal, [rhs, lhs, literal_length], line)
@@ -1570,7 +1570,7 @@ def is_string_literal(value: Value) -> TypeGuard[LoadLiteral]:
15701570
elif op == "!=":
15711571
if is_string_literal(lhs):
15721572
if is_string_literal(rhs):
1573-
# we can optimize out the check entirely in some Final cases
1573+
# we can optimize out the check entirely in some constant-folded cases
15741574
return self.true() if lhs.value != rhs.value else self.false()
15751575
literal_length = Integer(len(lhs.value), c_pyssize_t_rprimitive, line) # type: ignore [arg-type]
15761576
eq = self.primitive_op(str_eq_literal, [rhs, lhs, literal_length], line)

0 commit comments

Comments
 (0)