Files
swift-mirror/test/stdlib
Erik Eckstein 7f684b62e2 SIL optimizer: Add a new string optimization.
Optimizes String operations with constant operands.

Specifically:
  * Replaces x.append(y) with x = y if x is empty.
  * Removes x.append("")
  * Replaces x.append(y) with x = x + y if x and y are constant strings.
  * Replaces _typeName(T.self) with a constant string if T is statically known.

With this optimization it's possible to constant fold string interpolations, like "the \(Int.self) type" -> "the Int type"

This new pass runs on high-level SIL, where semantic calls are still in place.

rdar://problem/65642843
2020-07-27 21:32:56 +02:00
..
2019-09-18 21:32:14 -05:00
2020-07-13 14:05:13 -07:00
2019-11-26 18:25:49 -06:00
2020-02-16 21:16:01 +00:00
2019-01-25 15:25:01 -05:00