@@ -4403,7 +4403,6 @@ swift_getAssociatedTypeWitnessSlowImpl(
4403
4403
const Metadata *conformingType,
4404
4404
const ProtocolRequirement *reqBase,
4405
4405
const ProtocolRequirement *assocType) {
4406
- fprintf (stderr, " Entering slow path: %p %p %p %p\n " , wtable, conformingType, reqBase, assocType);
4407
4406
#ifndef NDEBUG
4408
4407
{
4409
4408
const ProtocolConformanceDescriptor *conformance = wtable->Description ;
@@ -4430,8 +4429,6 @@ swift_getAssociatedTypeWitnessSlowImpl(
4430
4429
const char *mangledNameBase =
4431
4430
(const char *)(uintptr_t (witness) &
4432
4431
~ProtocolRequirementFlags::AssociatedTypeMangledNameBit);
4433
- fprintf (stderr, " Mangled name base: %p\n " , mangledNameBase);
4434
- fprintf (stderr, " name: %s\n " , mangledNameBase);
4435
4432
4436
4433
// Check whether the mangled name has the prefix byte indicating that
4437
4434
// the mangled name is relative to the protocol itself.
@@ -4446,18 +4443,13 @@ swift_getAssociatedTypeWitnessSlowImpl(
4446
4443
const ProtocolConformanceDescriptor *conformance = wtable->Description ;
4447
4444
const ProtocolDescriptor *protocol = conformance->getProtocol ();
4448
4445
4449
- fprintf (stderr, " conformance %p protocol %p\n " , conformance, protocol);
4450
-
4451
4446
// Extract the mangled name itself.
4452
4447
StringRef mangledName =
4453
4448
Demangle::makeSymbolicMangledNameStringRef (mangledNameBase);
4454
4449
4455
- fprintf (stderr, " mangledName: %s\n " , mangledName.str ().c_str ());
4456
-
4457
4450
// Demangle the associated type.
4458
4451
MetadataResponse response;
4459
4452
if (inProtocolContext) {
4460
- fprintf (stderr, " in protocol context\n " );
4461
4453
// The protocol's Self is the only generic parameter that can occur in the
4462
4454
// type.
4463
4455
response =
@@ -4480,7 +4472,6 @@ swift_getAssociatedTypeWitnessSlowImpl(
4480
4472
dependentDescriptor);
4481
4473
}).getResponse ();
4482
4474
} else {
4483
- fprintf (stderr, " getting original conforming type\n " );
4484
4475
// The generic parameters in the associated type name are those of the
4485
4476
// conforming type.
4486
4477
@@ -4499,18 +4490,6 @@ swift_getAssociatedTypeWitnessSlowImpl(
4499
4490
}).getResponse ();
4500
4491
}
4501
4492
auto assocTypeMetadata = response.Value ;
4502
- fprintf (stderr, " assocTypeMetadata: %p\n " , assocTypeMetadata);
4503
-
4504
- if (true ) {
4505
- auto conformingTypeNameInfo = swift_getTypeName (conformingType, true );
4506
- StringRef conformingTypeName (conformingTypeNameInfo.data ,
4507
- conformingTypeNameInfo.length );
4508
- StringRef assocTypeName = findAssociatedTypeName (protocol, assocType);
4509
- fprintf (stderr, " fin: %s %s %s %s\n " , assocTypeName.str ().c_str (),
4510
- conformingTypeName.str ().c_str (),
4511
- protocol->Name .get (),
4512
- mangledName.str ().c_str ());
4513
- }
4514
4493
4515
4494
if (!assocTypeMetadata) {
4516
4495
auto conformingTypeNameInfo = swift_getTypeName (conformingType, true );
@@ -4546,20 +4525,9 @@ swift::swift_getAssociatedTypeWitness(MetadataRequest request,
4546
4525
// If the low bit of the witness is clear, it's already a metadata pointer.
4547
4526
unsigned witnessIndex = assocType - reqBase;
4548
4527
auto witness = ((const void * const *)wtable)[witnessIndex];
4549
- fprintf (stderr, " getAssociatedTypeWitness fastpath: %x %p\n " , witnessIndex, witness);
4550
4528
if (LLVM_LIKELY ((uintptr_t (witness) &
4551
4529
ProtocolRequirementFlags::AssociatedTypeMangledNameBit) == 0 )) {
4552
4530
// Cached metadata pointers are always complete.
4553
- fprintf (stderr, " fastpath: %p\n " , witness);
4554
- auto witnessPtr = (const Metadata *)witness;
4555
- witnessPtr->dump ();
4556
- if (witnessPtr->getKind () == MetadataKind::Class) {
4557
- fprintf (stderr, " class description:\n " );
4558
- auto witnessClass = witnessPtr->getClassObject ();
4559
- fprintf (stderr, " %lx\n " , *(unsigned long *)&witnessClass->Data );
4560
- if (witnessClass->isTypeMetadata ())
4561
- fprintf (stderr, " name: %s\n " , witnessClass->getDescription ()->Name .get ());
4562
- }
4563
4531
return MetadataResponse{(const Metadata *)witness, MetadataState::Complete};
4564
4532
}
4565
4533
0 commit comments