File: SILDeclRef.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 (145 lines) | stat: -rw-r--r-- 5,929 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// RUN: %target-sil-opt -enable-sil-verify-all -module-name="SILDeclRef" %s

// Check that SILDeclRefs with interface types can be parsed properly.

sil_stage canonical

import Builtin
import Swift
import SwiftShims

public protocol P {
  func foo() -> Int32
  func foo(n: Int32)
}

extension P {
  func boo() -> Int32
}

public class Base : P {
  public func foo() -> Int32
  public func foo(n: Int32)
  public func foo(f: Float) -> Int32
  deinit
  init()
}

public class Derived1 : Base {
  override public func foo() -> Int32
  override public func foo(n: Int32)
  override public func foo(f: Float) -> Int32
  deinit
  override init()
}

public class Derived2 : Base {
  override public func foo() -> Int32
  override public func foo(n: Int32)
  override public func foo(f: Float) -> Int32
  deinit
  override init()
}

public func testP(p: P) -> Int32

public func testBase(b: Base) -> Int32

// P.boo() -> Int32
sil @_TFE10SILDeclRefPS_1P3boofT_Vs5Int32 : $@convention(method) <Self where Self : P> (@in_guaranteed Self) -> Int32

// Int32.init(_builtinIntegerLiteral : Builtin.IntLiteral) -> Int32
sil public_external [transparent] [serialized] @_TFVs5Int32CfT22_builtinIntegerLiteralBI__S_ : $@convention(method) (Builtin.IntLiteral, @thin Int32.Type) -> Int32

// Base.foo() -> Int32
sil @_TFC10SILDeclRef4Base3foofT_Vs5Int32 : $@convention(method) (@guaranteed Base) -> Int32

// Base.foo(n : Int32) -> ()
sil @_TFC10SILDeclRef4Base3foofT1nVs5Int32_T_ : $@convention(method) (Int32, @guaranteed Base) -> ()

// Base.foo(f : Float) -> Int32
sil @_TFC10SILDeclRef4Base3foofT1fSf_Vs5Int32 : $@convention(method) (Float, @guaranteed Base) -> Int32

// Base.__deallocating_deinit
sil @_TFC10SILDeclRef4BaseD : $@convention(method) (@owned Base) -> ()

// Base.deinit
sil @_TFC10SILDeclRef4Based : $@convention(method) (@guaranteed Base) -> @owned Builtin.NativeObject

// Base.init() -> Base
sil @_TFC10SILDeclRef4BasecfT_S0_ : $@convention(method) (@owned Base) -> @owned Base

// protocol witness for P.foo() -> Int32 in conformance Base
sil [transparent] [thunk] @_TTWC10SILDeclRef4BaseS_1PS_FS1_3foofT_Vs5Int32 : $@convention(witness_method: P) (@in_guaranteed Base) -> Int32

// protocol witness for P.foo(n : Int32) -> () in conformance Base
sil [transparent] [thunk] @_TTWC10SILDeclRef4BaseS_1PS_FS1_3foofT1nVs5Int32_T_ : $@convention(witness_method: P) (Int32, @in_guaranteed Base) -> ()

// Derived1.foo() -> Int32
sil @_TFC10SILDeclRef8Derived13foofT_Vs5Int32 : $@convention(method) (@guaranteed Derived1) -> Int32

// Derived1.foo(n : Int32) -> ()
sil @_TFC10SILDeclRef8Derived13foofT1nVs5Int32_T_ : $@convention(method) (Int32, @guaranteed Derived1) -> ()

// Derived1.foo(f : Float) -> Int32
sil @_TFC10SILDeclRef8Derived13foofT1fSf_Vs5Int32 : $@convention(method) (Float, @guaranteed Derived1) -> Int32

// Derived1.__deallocating_deinit
sil @_TFC10SILDeclRef8Derived1D : $@convention(method) (@owned Derived1) -> ()

// Derived1.deinit
sil @_TFC10SILDeclRef8Derived1d : $@convention(method) (@guaranteed Derived1) -> @owned Builtin.NativeObject

// Derived1.init() -> Derived1
sil @_TFC10SILDeclRef8Derived1cfT_S0_ : $@convention(method) (@owned Derived1) -> @owned Derived1

// Derived2.foo() -> Int32
sil @_TFC10SILDeclRef8Derived23foofT_Vs5Int32 : $@convention(method) (@guaranteed Derived2) -> Int32

// Derived2.foo(n : Int32) -> ()
sil @_TFC10SILDeclRef8Derived23foofT1nVs5Int32_T_ : $@convention(method) (Int32, @guaranteed Derived2) -> ()

// Derived2.foo(f : Float) -> Int32
sil @_TFC10SILDeclRef8Derived23foofT1fSf_Vs5Int32 : $@convention(method) (Float, @guaranteed Derived2) -> Int32

// Derived2.__deallocating_deinit
sil @_TFC10SILDeclRef8Derived2D : $@convention(method) (@owned Derived2) -> ()

// Derived2.deinit
sil @_TFC10SILDeclRef8Derived2d : $@convention(method) (@guaranteed Derived2) -> @owned Builtin.NativeObject

// Derived2.init() -> Derived2
sil @_TFC10SILDeclRef8Derived2cfT_S0_ : $@convention(method) (@owned Derived2) -> @owned Derived2

// testP(p : P) -> Int32
sil @_TF10SILDeclRef5testPFT1pPS_1P__Vs5Int32 : $@convention(thin) (@in P) -> Int32

// testBase(b : Base) -> Int32
sil @_TF10SILDeclRef8testBaseFT1bCS_4Base_Vs5Int32 : $@convention(thin) (@owned Base) -> Int32

sil_vtable Derived1 {
  #Base.foo: (Base) -> () -> Int32 : @_TFC10SILDeclRef8Derived13foofT_Vs5Int32	// Derived1.foo() -> Int32
  #Base.foo: (Base) -> (Int32) -> () : @_TFC10SILDeclRef8Derived13foofT1nVs5Int32_T_	// Derived1.foo(n : Int32) -> ()
  #Base.foo: (Base) -> (Float) -> Int32 : @_TFC10SILDeclRef8Derived13foofT1fSf_Vs5Int32	// Derived1.foo(f : Float) -> Int32
  #Base.init!initializer: (Base.Type) -> () -> Base : @_TFC10SILDeclRef8Derived1cfT_S0_	// Derived1.init() -> Derived1
  #Derived1.deinit!deallocator: (Derived1) -> () -> () : @_TFC10SILDeclRef8Derived1D	// Derived1.__deallocating_deinit
}

sil_vtable Derived2 {
  #Base.foo: (Base) -> () -> Int32 : @_TFC10SILDeclRef8Derived23foofT_Vs5Int32	// Derived2.foo() -> Int32
  #Base.foo: (Base) -> (Int32) -> () : @_TFC10SILDeclRef8Derived23foofT1nVs5Int32_T_	// Derived2.foo(n : Int32) -> ()
  #Base.foo: (Base) -> (Float) -> Int32 : @_TFC10SILDeclRef8Derived23foofT1fSf_Vs5Int32	// Derived2.foo(f : Float) -> Int32
  #Base.init!initializer: (Base.Type) -> () -> Base : @_TFC10SILDeclRef8Derived2cfT_S0_	// Derived2.init() -> Derived2
  #Derived2.deinit!deallocator: (Derived2) -> () -> () : @_TFC10SILDeclRef8Derived2D	// Derived2.__deallocating_deinit
}

sil_witness_table [serialized] Base: P module SILDeclRef {
  method #P.foo: <Self where Self : P> (Self) -> () -> Int32 : @_TTWC10SILDeclRef4BaseS_1PS_FS1_3foofT_Vs5Int32	// protocol witness for P.foo() -> Int32 in conformance Base
  method #P.foo: <Self where Self : P> (Self) -> (Int32) -> () : @_TTWC10SILDeclRef4BaseS_1PS_FS1_3foofT1nVs5Int32_T_	// protocol witness for P.foo(n : Int32) -> () in conformance Base
}

sil_default_witness_table P {
  no_default
  no_default
}