mirror of
https://github.com/apple/swift.git
synced 2026-10-12 14:50:47 +02:00
Leans on the previous refactor to apply file-level default isolation via isolation inference. Follows the 'final' version of 478, so top level globals are included in file-level default isolation. Adds `effectivelyExplicit` method, to be used instead of checking for the Explicit enum value directly, since a file-level default isolation should be treated as effectively default for free un/adopt (the non-explicit form would be unintuitive to express without the module feature flag). This commit will diagnose @available or @diagnose until the next commit... Note that computeActorIsolation needs to be updated to accept isolation on file-scope global stored properties, the old check was too broad, and in (i think?) trying to reject isolation on computed properties of types, also rejected it on top-level code.
13 lines
311 B
Python
13 lines
311 B
Python
"""Normalize SIL output for stable diffs.
|
|
|
|
Opened-existential archetypes carry a per-compilation UUID that would prevent
|
|
diffing SIL. Replace each archetype's UUID with a placeholder before diff.
|
|
"""
|
|
|
|
import re
|
|
import sys
|
|
|
|
sys.stdout.write(
|
|
re.sub(r'@opened\("[^"]+"', '@opened("UUID"', sys.stdin.read())
|
|
)
|