@@ -4277,7 +4277,6 @@ swift_getAssociatedTypeWitnessSlowImpl(
4277
4277
const Metadata *conformingType,
4278
4278
const ProtocolRequirement *reqBase,
4279
4279
const ProtocolRequirement *assocType) {
4280
- fprintf (stderr, " Entering slow path: %p %p %p %p\n " , wtable, conformingType, reqBase, assocType);
4281
4280
#ifndef NDEBUG
4282
4281
{
4283
4282
const ProtocolConformanceDescriptor *conformance = wtable->Description ;
@@ -4304,8 +4303,6 @@ swift_getAssociatedTypeWitnessSlowImpl(
4304
4303
const char *mangledNameBase =
4305
4304
(const char *)(uintptr_t (witness) &
4306
4305
~ProtocolRequirementFlags::AssociatedTypeMangledNameBit);
4307
- fprintf (stderr, " Mangled name base: %p\n " , mangledNameBase);
4308
- fprintf (stderr, " name: %s\n " , mangledNameBase);
4309
4306
4310
4307
// Check whether the mangled name has the prefix byte indicating that
4311
4308
// the mangled name is relative to the protocol itself.
@@ -4320,18 +4317,13 @@ swift_getAssociatedTypeWitnessSlowImpl(
4320
4317
const ProtocolConformanceDescriptor *conformance = wtable->Description ;
4321
4318
const ProtocolDescriptor *protocol = conformance->getProtocol ();
4322
4319
4323
- fprintf (stderr, " conformance %p protocol %p\n " , conformance, protocol);
4324
-
4325
4320
// Extract the mangled name itself.
4326
4321
StringRef mangledName =
4327
4322
Demangle::makeSymbolicMangledNameStringRef (mangledNameBase);
4328
4323
4329
- fprintf (stderr, " mangledName: %s\n " , mangledName.str ().c_str ());
4330
-
4331
4324
// Demangle the associated type.
4332
4325
MetadataResponse response;
4333
4326
if (inProtocolContext) {
4334
- fprintf (stderr, " in protocol context\n " );
4335
4327
// The protocol's Self is the only generic parameter that can occur in the
4336
4328
// type.
4337
4329
response =
@@ -4354,7 +4346,6 @@ swift_getAssociatedTypeWitnessSlowImpl(
4354
4346
dependentDescriptor);
4355
4347
}).getResponse ();
4356
4348
} else {
4357
- fprintf (stderr, " getting original conforming type\n " );
4358
4349
// The generic parameters in the associated type name are those of the
4359
4350
// conforming type.
4360
4351
@@ -4373,18 +4364,6 @@ swift_getAssociatedTypeWitnessSlowImpl(
4373
4364
}).getResponse ();
4374
4365
}
4375
4366
auto assocTypeMetadata = response.Value ;
4376
- fprintf (stderr, " assocTypeMetadata: %p\n " , assocTypeMetadata);
4377
-
4378
- if (true ) {
4379
- auto conformingTypeNameInfo = swift_getTypeName (conformingType, true );
4380
- StringRef conformingTypeName (conformingTypeNameInfo.data ,
4381
- conformingTypeNameInfo.length );
4382
- StringRef assocTypeName = findAssociatedTypeName (protocol, assocType);
4383
- fprintf (stderr, " fin: %s %s %s %s\n " , assocTypeName.str ().c_str (),
4384
- conformingTypeName.str ().c_str (),
4385
- protocol->Name .get (),
4386
- mangledName.str ().c_str ());
4387
- }
4388
4367
4389
4368
if (!assocTypeMetadata) {
4390
4369
auto conformingTypeNameInfo = swift_getTypeName (conformingType, true );
@@ -4420,20 +4399,9 @@ swift::swift_getAssociatedTypeWitness(MetadataRequest request,
4420
4399
// If the low bit of the witness is clear, it's already a metadata pointer.
4421
4400
unsigned witnessIndex = assocType - reqBase;
4422
4401
auto witness = ((const void * const *)wtable)[witnessIndex];
4423
- fprintf (stderr, " getAssociatedTypeWitness fastpath: %x %p\n " , witnessIndex, witness);
4424
4402
if (LLVM_LIKELY ((uintptr_t (witness) &
4425
4403
ProtocolRequirementFlags::AssociatedTypeMangledNameBit) == 0 )) {
4426
4404
// Cached metadata pointers are always complete.
4427
- fprintf (stderr, " fastpath: %p\n " , witness);
4428
- auto witnessPtr = (const Metadata *)witness;
4429
- witnessPtr->dump ();
4430
- if (witnessPtr->getKind () == MetadataKind::Class) {
4431
- fprintf (stderr, " class description:\n " );
4432
- auto witnessClass = witnessPtr->getClassObject ();
4433
- fprintf (stderr, " %lx\n " , *(unsigned long *)&witnessClass->Data );
4434
- if (witnessClass->isTypeMetadata ())
4435
- fprintf (stderr, " name: %s\n " , witnessClass->getDescription ()->Name .get ());
4436
- }
4437
4405
return MetadataResponse{(const Metadata *)witness, MetadataState::Complete};
4438
4406
}
4439
4407
0 commit comments