File: mandatory_inlining_open_existential.sil

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (45 lines) | stat: -rw-r--r-- 1,938 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining

sil_stage raw

import Builtin
import Swift
import SwiftShims

protocol P {
  func f7() -> () -> Self
}

sil hidden [ossa] @caller : $@convention(thin) (@in P) -> () {
bb0(%0 : $*P):
  %2 = open_existential_addr immutable_access %0 : $*P to $*@opened("214EF566-CD33-11E6-A1F0-34363BD08DA0", P) Self
  %3 = witness_method $@opened("214EF566-CD33-11E6-A1F0-34363BD08DA0", P) Self, #P.f7, %2 : $*@opened("214EF566-CD33-11E6-A1F0-34363BD08DA0", P) Self : $@convention(witness_method: P) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> @owned @callee_owned () -> @out τ_0_0
  %4 = apply %3<@opened("214EF566-CD33-11E6-A1F0-34363BD08DA0", P) Self>(%2) : $@convention(witness_method: P) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> @owned @callee_owned () -> @out τ_0_0

  %5 = function_ref @callee : $@convention(thin) <τ_0_0 where τ_0_0 : P> (@owned @callee_owned () -> @out τ_0_0) -> @out P
  %6 = partial_apply %5<@opened("214EF566-CD33-11E6-A1F0-34363BD08DA0", P) Self>(%4) : $@convention(thin) <τ_0_0 where τ_0_0 : P> (@owned @callee_owned () -> @out τ_0_0) -> @out P
  %9 = alloc_stack $P
  %8 = copy_value %6 : $@callee_owned () -> @out P
  %10 = apply %8(%9) : $@callee_owned () -> @out P
  destroy_addr %9 : $*P
  dealloc_stack %9 : $*P
  destroy_value %6 : $@callee_owned () -> @out P
  destroy_addr %0 : $*P
  %15 = tuple ()
  return %15 : $()
}

sil hidden [transparent] [ossa] @callee : $@convention(thin) <τ_0_0 where τ_0_0 : P> (@owned @callee_owned () -> @out τ_0_0) -> @out P {
bb0(%0 : $*P, %1 : @owned $@callee_owned () -> @out τ_0_0):
  %2 = alloc_stack $τ_0_0
  %3 = apply %1(%2) : $@callee_owned () -> @out τ_0_0
  %4 = init_existential_addr %0 : $*P, $τ_0_0
  copy_addr [take] %2 to [init] %4 : $*τ_0_0
  %6 = tuple ()
  dealloc_stack %2 : $*τ_0_0
  return %6 : $()
}

sil_default_witness_table hidden P {
  no_default
}