mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
* Simplified the logic for creating static initializers and constant folding for global variables: instead of creating a getter function, directly inline the constant value into the use-sites. * Wired up the constant folder in GlobalOpt, so that a chains for global variables can be propagated, e.g. let a = 1 let b = a + 10 let c = b + 5 * Fixed a problem where we didn't create a static initializer if a global is not used in the same module. E.g. a public let variable. * Simplified the code in general. rdar://problem/31515927
9.7 KiB
9.7 KiB