@@ -58,7 +58,7 @@ extern "C"
58
58
HeapObject *swift_allocObject (HeapMetadata const *metadata,
59
59
size_t requiredSize,
60
60
size_t requiredAlignmentMask)
61
- CALLING_CONVENTION(RuntimeCC1 );
61
+ CALLING_CONVENTION(RegisterPreservingCC );
62
62
63
63
64
64
// / Initializes the object header of a stack allocated object.
@@ -159,15 +159,15 @@ extern "C" BoxPair::Return (*_swift_allocBox)(Metadata const *type);
159
159
RT_ENTRY_VISIBILITY
160
160
extern " C"
161
161
void *swift_slowAlloc (size_t bytes, size_t alignMask)
162
- CALLING_CONVENTION(RuntimeCC1 );
162
+ CALLING_CONVENTION(RegisterPreservingCC );
163
163
164
164
165
165
// If the caller cannot promise to zero the object during destruction,
166
166
// then call these corresponding APIs:
167
167
RT_ENTRY_VISIBILITY
168
168
extern " C"
169
169
void swift_slowDealloc (void *ptr, size_t bytes, size_t alignMask)
170
- CALLING_CONVENTION(RuntimeCC1 );
170
+ CALLING_CONVENTION(RegisterPreservingCC );
171
171
172
172
// / Atomically increments the retain count of an object.
173
173
// /
@@ -184,21 +184,21 @@ void swift_slowDealloc(void *ptr, size_t bytes, size_t alignMask)
184
184
RT_ENTRY_VISIBILITY
185
185
extern " C"
186
186
void swift_retain (HeapObject *object)
187
- CALLING_CONVENTION(RuntimeCC1 );
187
+ CALLING_CONVENTION(RegisterPreservingCC );
188
188
189
189
SWIFT_RUNTIME_EXPORT
190
190
extern " C"
191
- void (* CALLING_CONVENTION (RuntimeCC1 ) _swift_retain)(HeapObject *object);
191
+ void (* CALLING_CONVENTION (RegisterPreservingCC ) _swift_retain)(HeapObject *object);
192
192
193
193
194
194
RT_ENTRY_VISIBILITY
195
195
extern " C"
196
196
void swift_retain_n (HeapObject *object, uint32_t n)
197
- CALLING_CONVENTION(RuntimeCC1 );
197
+ CALLING_CONVENTION(RegisterPreservingCC );
198
198
199
199
SWIFT_RUNTIME_EXPORT
200
200
extern " C"
201
- void (*CALLING_CONVENTION (RuntimeCC1 ) _swift_retain_n)(HeapObject *object,
201
+ void (*CALLING_CONVENTION (RegisterPreservingCC ) _swift_retain_n)(HeapObject *object,
202
202
uint32_t n);
203
203
204
204
static inline void _swift_retain_inlined (HeapObject *object) {
@@ -212,19 +212,19 @@ static inline void _swift_retain_inlined(HeapObject *object) {
212
212
RT_ENTRY_VISIBILITY
213
213
extern " C"
214
214
HeapObject *swift_tryRetain (HeapObject *object)
215
- CALLING_CONVENTION(RuntimeCC1 );
215
+ CALLING_CONVENTION(RegisterPreservingCC );
216
216
217
217
SWIFT_RUNTIME_EXPORT
218
218
extern " C"
219
- HeapObject * (* CALLING_CONVENTION (RuntimeCC1 ) _swift_tryRetain)(HeapObject *);
219
+ HeapObject * (* CALLING_CONVENTION (RegisterPreservingCC ) _swift_tryRetain)(HeapObject *);
220
220
221
221
// / Returns true if an object is in the process of being deallocated.
222
222
SWIFT_RUNTIME_EXPORT
223
223
extern " C" bool swift_isDeallocating (HeapObject *object);
224
224
225
225
SWIFT_RUNTIME_EXPORT
226
226
extern " C"
227
- bool (* CALLING_CONVENTION (RuntimeCC1 ) _swift_isDeallocating)(HeapObject *);
227
+ bool (* CALLING_CONVENTION (RegisterPreservingCC ) _swift_isDeallocating)(HeapObject *);
228
228
229
229
230
230
// / Attempts to atomically pin an object and increment its reference
@@ -236,15 +236,16 @@ bool (* CALLING_CONVENTION(RuntimeCC1) _swift_isDeallocating)(HeapObject *);
236
236
// / The object reference may not be nil.
237
237
RT_ENTRY_VISIBILITY
238
238
extern " C" HeapObject *swift_tryPin (HeapObject *object)
239
- CALLING_CONVENTION(RuntimeCC1 );
239
+ CALLING_CONVENTION(RegisterPreservingCC );
240
240
241
241
// / Given that an object is pinned, atomically unpin it and decrement
242
242
// / the reference count.
243
243
// /
244
244
// / The object reference may be nil (to simplify the protocol).
245
245
RT_ENTRY_VISIBILITY
246
- extern " C" void swift_unpin (HeapObject *object) CALLING_CONVENTION(RuntimeCC1);
247
-
246
+ extern " C" void swift_unpin (HeapObject *object)
247
+ CALLING_CONVENTION(RegisterPreservingCC);
248
+
248
249
// / Atomically decrements the retain count of an object. If the
249
250
// / retain count reaches zero, the object is destroyed as follows:
250
251
// /
@@ -263,23 +264,22 @@ extern "C" void swift_unpin(HeapObject *object) CALLING_CONVENTION(RuntimeCC1);
263
264
RT_ENTRY_VISIBILITY
264
265
extern " C"
265
266
void swift_release (HeapObject *object)
266
- CALLING_CONVENTION(RuntimeCC1 );
267
+ CALLING_CONVENTION(RegisterPreservingCC );
267
268
268
269
SWIFT_RUNTIME_EXPORT
269
- extern " C"
270
- void (* CALLING_CONVENTION (RuntimeCC1) _swift_release)(HeapObject *object);
270
+ extern " C" void (* CALLING_CONVENTION (RegisterPreservingCC)
271
+ _swift_release)(HeapObject *object);
271
272
272
273
// / Atomically decrements the retain count of an object n times. If the retain
273
274
// / count reaches zero, the object is destroyed
274
275
RT_ENTRY_VISIBILITY
275
276
extern " C"
276
277
void swift_release_n (HeapObject *object, uint32_t n)
277
- CALLING_CONVENTION(RuntimeCC1 );
278
+ CALLING_CONVENTION(RegisterPreservingCC );
278
279
279
280
SWIFT_RUNTIME_EXPORT
280
- extern " C"
281
- void (*CALLING_CONVENTION (RuntimeCC1) _swift_release_n)(HeapObject *object,
282
- uint32_t n);
281
+ extern " C" void (*CALLING_CONVENTION (RegisterPreservingCC)
282
+ _swift_release_n)(HeapObject *object, uint32_t n);
283
283
284
284
// Refcounting observation hooks for memory tools. Don't use these.
285
285
SWIFT_RUNTIME_EXPORT
@@ -323,19 +323,19 @@ extern "C" bool swift_isUniquelyReferenced_native(const struct HeapObject *);
323
323
// / to an object?
324
324
RT_ENTRY_VISIBILITY
325
325
extern " C" bool swift_isUniquelyReferencedOrPinned_native (
326
- const struct HeapObject *) CALLING_CONVENTION(RuntimeCC1 );
326
+ const struct HeapObject *) CALLING_CONVENTION(RegisterPreservingCC );
327
327
328
328
// / Is this non-null native Swift pointer a unique reference to
329
329
// / an object?
330
330
RT_ENTRY_VISIBILITY
331
331
extern " C" bool swift_isUniquelyReferenced_nonNull_native (
332
- const struct HeapObject *) CALLING_CONVENTION(RuntimeCC1 );
332
+ const struct HeapObject *) CALLING_CONVENTION(RegisterPreservingCC );
333
333
334
334
// / Does this non-null native Swift pointer refer to an object that
335
335
// / is either uniquely referenced or pinned?
336
336
RT_ENTRY_VISIBILITY
337
337
extern " C" bool swift_isUniquelyReferencedOrPinned_nonNull_native (
338
- const struct HeapObject *) CALLING_CONVENTION(RuntimeCC1 );
338
+ const struct HeapObject *) CALLING_CONVENTION(RegisterPreservingCC );
339
339
340
340
// / Deallocate the given memory.
341
341
// /
@@ -355,7 +355,7 @@ extern "C" bool swift_isUniquelyReferencedOrPinned_nonNull_native(
355
355
RT_ENTRY_VISIBILITY
356
356
extern " C" void swift_deallocObject (HeapObject *object, size_t allocatedSize,
357
357
size_t allocatedAlignMask)
358
- CALLING_CONVENTION(RuntimeCC1 );
358
+ CALLING_CONVENTION(RegisterPreservingCC );
359
359
360
360
// / Deallocate the given memory.
361
361
// /
@@ -465,35 +465,35 @@ struct UnownedReference {
465
465
// / Increment the weak/unowned retain count.
466
466
RT_ENTRY_VISIBILITY
467
467
extern " C" void swift_unownedRetain (HeapObject *value)
468
- CALLING_CONVENTION(RuntimeCC1 );
468
+ CALLING_CONVENTION(RegisterPreservingCC );
469
469
470
470
// / Decrement the weak/unowned retain count.
471
471
RT_ENTRY_VISIBILITY
472
472
extern " C" void swift_unownedRelease (HeapObject *value)
473
- CALLING_CONVENTION(RuntimeCC1 );
473
+ CALLING_CONVENTION(RegisterPreservingCC );
474
474
475
475
// / Increment the weak/unowned retain count by n.
476
476
RT_ENTRY_VISIBILITY
477
477
extern " C" void swift_unownedRetain_n (HeapObject *value, int n)
478
- CALLING_CONVENTION(RuntimeCC1 );
478
+ CALLING_CONVENTION(RegisterPreservingCC );
479
479
480
480
// / Decrement the weak/unowned retain count by n.
481
481
RT_ENTRY_VISIBILITY
482
482
extern " C" void swift_unownedRelease_n (HeapObject *value, int n)
483
- CALLING_CONVENTION(RuntimeCC1 );
483
+ CALLING_CONVENTION(RegisterPreservingCC );
484
484
485
485
// / Increment the strong retain count of an object, aborting if it has
486
486
// / been deallocated.
487
487
RT_ENTRY_VISIBILITY
488
488
extern " C" void swift_unownedRetainStrong (HeapObject *value)
489
- CALLING_CONVENTION(RuntimeCC1 );
489
+ CALLING_CONVENTION(RegisterPreservingCC );
490
490
491
491
// / Increment the strong retain count of an object which may have been
492
492
// / deallocated, aborting if it has been deallocated, and decrement its
493
493
// / weak/unowned reference count.
494
494
RT_ENTRY_VISIBILITY
495
495
extern " C" void swift_unownedRetainStrongAndRelease (HeapObject *value)
496
- CALLING_CONVENTION(RuntimeCC1 );
496
+ CALLING_CONVENTION(RegisterPreservingCC );
497
497
498
498
// / Aborts if the object has been deallocated.
499
499
SWIFT_RUNTIME_EXPORT
@@ -640,11 +640,11 @@ extern "C" void swift_weakTakeAssign(WeakReference *dest, WeakReference *src);
640
640
641
641
SWIFT_RUNTIME_EXPORT
642
642
extern " C" void *swift_bridgeObjectRetain (void *value)
643
- CALLING_CONVENTION(RuntimeCC0 );
643
+ CALLING_CONVENTION(DefaultCC );
644
644
// / Increment the strong retain count of a bridged object by n.
645
645
SWIFT_RUNTIME_EXPORT
646
646
extern " C" void *swift_bridgeObjectRetain_n (void *value, int n)
647
- CALLING_CONVENTION(RuntimeCC0 );
647
+ CALLING_CONVENTION(DefaultCC );
648
648
649
649
/* ****************************************************************************/
650
650
/* *********************** UNKNOWN REFERENCE-COUNTING *************************/
@@ -656,57 +656,57 @@ SWIFT_RUNTIME_EXPORT
656
656
// / Swift object.
657
657
SWIFT_RUNTIME_EXPORT
658
658
extern " C" void swift_unknownRetain (void *value)
659
- CALLING_CONVENTION(RuntimeCC0 );
659
+ CALLING_CONVENTION(DefaultCC );
660
660
// / Increment the strong retain count of an object which might not be a native
661
661
// / Swift object by n.
662
662
SWIFT_RUNTIME_EXPORT
663
663
extern " C" void swift_unknownRetain_n (void *value, int n)
664
- CALLING_CONVENTION(RuntimeCC0 );
664
+ CALLING_CONVENTION(DefaultCC );
665
665
666
666
#else
667
667
668
668
static inline void swift_unknownRetain (void *value)
669
- CALLING_CONVENTION(RuntimeCC0 ) {
669
+ CALLING_CONVENTION(DefaultCC ) {
670
670
swift_retain (static_cast <HeapObject *>(value));
671
671
}
672
672
673
673
static inline void swift_unknownRetain_n (void *value, int n)
674
- CALLING_CONVENTION(RuntimeCC0 ) {
674
+ CALLING_CONVENTION(DefaultCC ) {
675
675
swift_retain_n (static_cast <HeapObject *>(value), n);
676
676
}
677
677
678
678
#endif /* SWIFT_OBJC_INTEROP */
679
679
680
680
SWIFT_RUNTIME_EXPORT
681
681
extern " C" void swift_bridgeObjectRelease (void *value)
682
- CALLING_CONVENTION(RuntimeCC0 );
682
+ CALLING_CONVENTION(DefaultCC );
683
683
// / Decrement the strong retain count of a bridged object by n.
684
684
SWIFT_RUNTIME_EXPORT
685
685
extern " C" void swift_bridgeObjectRelease_n (void *value, int n)
686
- CALLING_CONVENTION(RuntimeCC0 );
686
+ CALLING_CONVENTION(DefaultCC );
687
687
688
688
#if SWIFT_OBJC_INTEROP
689
689
690
690
// / Decrement the strong retain count of an object which might not be a native
691
691
// / Swift object.
692
692
SWIFT_RUNTIME_EXPORT
693
693
extern " C" void swift_unknownRelease (void *value)
694
- CALLING_CONVENTION(RuntimeCC0 );
694
+ CALLING_CONVENTION(DefaultCC );
695
695
// / Decrement the strong retain count of an object which might not be a native
696
696
// / Swift object by n.
697
697
SWIFT_RUNTIME_EXPORT
698
698
extern " C" void swift_unknownRelease_n (void *value, int n)
699
- CALLING_CONVENTION(RuntimeCC0 );
699
+ CALLING_CONVENTION(DefaultCC );
700
700
701
701
#else
702
702
703
703
static inline void swift_unknownRelease (void *value)
704
- CALLING_CONVENTION(RuntimeCC1 ) {
704
+ CALLING_CONVENTION(RegisterPreservingCC ) {
705
705
swift_release (static_cast <HeapObject *>(value));
706
706
}
707
707
708
708
static inline void swift_unknownRelease_n (void *value, int n)
709
- CALLING_CONVENTION(RuntimeCC1 ) {
709
+ CALLING_CONVENTION(RegisterPreservingCC ) {
710
710
swift_release_n (static_cast <HeapObject *>(value), n);
711
711
}
712
712
0 commit comments