@@ -4350,7 +4350,6 @@ swift_getAssociatedTypeWitnessSlowImpl(
4350
4350
const Metadata *conformingType,
4351
4351
const ProtocolRequirement *reqBase,
4352
4352
const ProtocolRequirement *assocType) {
4353
- fprintf (stderr, " Entering slow path: %p %p %p %p\n " , wtable, conformingType, reqBase, assocType);
4354
4353
#ifndef NDEBUG
4355
4354
{
4356
4355
const ProtocolConformanceDescriptor *conformance = wtable->Description ;
@@ -4377,8 +4376,6 @@ swift_getAssociatedTypeWitnessSlowImpl(
4377
4376
const char *mangledNameBase =
4378
4377
(const char *)(uintptr_t (witness) &
4379
4378
~ProtocolRequirementFlags::AssociatedTypeMangledNameBit);
4380
- fprintf (stderr, " Mangled name base: %p\n " , mangledNameBase);
4381
- fprintf (stderr, " name: %s\n " , mangledNameBase);
4382
4379
4383
4380
// Check whether the mangled name has the prefix byte indicating that
4384
4381
// the mangled name is relative to the protocol itself.
@@ -4393,18 +4390,13 @@ swift_getAssociatedTypeWitnessSlowImpl(
4393
4390
const ProtocolConformanceDescriptor *conformance = wtable->Description ;
4394
4391
const ProtocolDescriptor *protocol = conformance->getProtocol ();
4395
4392
4396
- fprintf (stderr, " conformance %p protocol %p\n " , conformance, protocol);
4397
-
4398
4393
// Extract the mangled name itself.
4399
4394
StringRef mangledName =
4400
4395
Demangle::makeSymbolicMangledNameStringRef (mangledNameBase);
4401
4396
4402
- fprintf (stderr, " mangledName: %s\n " , mangledName.str ().c_str ());
4403
-
4404
4397
// Demangle the associated type.
4405
4398
MetadataResponse response;
4406
4399
if (inProtocolContext) {
4407
- fprintf (stderr, " in protocol context\n " );
4408
4400
// The protocol's Self is the only generic parameter that can occur in the
4409
4401
// type.
4410
4402
response =
@@ -4427,7 +4419,6 @@ swift_getAssociatedTypeWitnessSlowImpl(
4427
4419
dependentDescriptor);
4428
4420
}).getResponse ();
4429
4421
} else {
4430
- fprintf (stderr, " getting original conforming type\n " );
4431
4422
// The generic parameters in the associated type name are those of the
4432
4423
// conforming type.
4433
4424
@@ -4446,18 +4437,6 @@ swift_getAssociatedTypeWitnessSlowImpl(
4446
4437
}).getResponse ();
4447
4438
}
4448
4439
auto assocTypeMetadata = response.Value ;
4449
- fprintf (stderr, " assocTypeMetadata: %p\n " , assocTypeMetadata);
4450
-
4451
- if (true ) {
4452
- auto conformingTypeNameInfo = swift_getTypeName (conformingType, true );
4453
- StringRef conformingTypeName (conformingTypeNameInfo.data ,
4454
- conformingTypeNameInfo.length );
4455
- StringRef assocTypeName = findAssociatedTypeName (protocol, assocType);
4456
- fprintf (stderr, " fin: %s %s %s %s\n " , assocTypeName.str ().c_str (),
4457
- conformingTypeName.str ().c_str (),
4458
- protocol->Name .get (),
4459
- mangledName.str ().c_str ());
4460
- }
4461
4440
4462
4441
if (!assocTypeMetadata) {
4463
4442
auto conformingTypeNameInfo = swift_getTypeName (conformingType, true );
@@ -4493,20 +4472,9 @@ swift::swift_getAssociatedTypeWitness(MetadataRequest request,
4493
4472
// If the low bit of the witness is clear, it's already a metadata pointer.
4494
4473
unsigned witnessIndex = assocType - reqBase;
4495
4474
auto witness = ((const void * const *)wtable)[witnessIndex];
4496
- fprintf (stderr, " getAssociatedTypeWitness fastpath: %x %p\n " , witnessIndex, witness);
4497
4475
if (LLVM_LIKELY ((uintptr_t (witness) &
4498
4476
ProtocolRequirementFlags::AssociatedTypeMangledNameBit) == 0 )) {
4499
4477
// Cached metadata pointers are always complete.
4500
- fprintf (stderr, " fastpath: %p\n " , witness);
4501
- auto witnessPtr = (const Metadata *)witness;
4502
- witnessPtr->dump ();
4503
- if (witnessPtr->getKind () == MetadataKind::Class) {
4504
- fprintf (stderr, " class description:\n " );
4505
- auto witnessClass = witnessPtr->getClassObject ();
4506
- fprintf (stderr, " %lx\n " , *(unsigned long *)&witnessClass->Data );
4507
- if (witnessClass->isTypeMetadata ())
4508
- fprintf (stderr, " name: %s\n " , witnessClass->getDescription ()->Name .get ());
4509
- }
4510
4478
return MetadataResponse{(const Metadata *)witness, MetadataState::Complete};
4511
4479
}
4512
4480
0 commit comments