[vm] Remove unused code related to RedirectionData

Since the transition from Source based to Kernel based frontend to the
Dart VM, we have not supported callable redirecting factories. This has
caused all removed code in this CL to be unused and untested!

The support for reifing redirection related information would mainly be
used by embedder / dart:mirrors. Right now its not used by anyone and
the kernel support was never implemented.

I suggest we remove the unused and untested code until a decision has
been made that we actually want to support it - in which case it can be
properly implemented, possibly by re-using some of the deleted code in
this CL.

TEST=CL removes unused code, no test result changes.

Change-Id: I7ed45c85b4efcc1e81ce44cbe08bb555e52101b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166853
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index e1ab140..a829957 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -269,8 +269,7 @@
   kind_flags |=
       (static_cast<intptr_t>(is_ctor && func.IsGenerativeConstructor())
        << Mirrors::kGenerativeCtor);
-  kind_flags |= (static_cast<intptr_t>(is_ctor && func.is_redirecting())
-                 << Mirrors::kRedirectingCtor);
+  kind_flags |= (static_cast<intptr_t>(false) << Mirrors::kRedirectingCtor);
   kind_flags |= (static_cast<intptr_t>(is_ctor && func.IsFactory())
                  << Mirrors::kFactoryCtor);
   kind_flags |=
@@ -1402,29 +1401,6 @@
   }
 
   Class& redirected_klass = Class::Handle(klass.raw());
-  Function& redirected_constructor = Function::Handle(lookup_constructor.raw());
-  if (lookup_constructor.IsRedirectingFactory()) {
-    // Redirecting factory must be resolved.
-    ASSERT(lookup_constructor.RedirectionTarget() != Function::null());
-    Type& redirect_type = Type::Handle(lookup_constructor.RedirectionType());
-
-    if (!redirect_type.IsInstantiated()) {
-      // The type arguments of the redirection type are instantiated from the
-      // type arguments of the type reflected by the class mirror.
-      ASSERT(redirect_type.IsInstantiated(kFunctions));
-      redirect_type ^= redirect_type.InstantiateFrom(
-          type_arguments, Object::null_type_arguments(), kNoneFree, Heap::kOld);
-      redirect_type ^= redirect_type.Canonicalize(thread, nullptr);
-    }
-
-    type = redirect_type.raw();
-    type_arguments = redirect_type.arguments();
-
-    redirected_constructor = lookup_constructor.RedirectionTarget();
-    ASSERT(!redirected_constructor.IsNull());
-    redirected_klass = type.type_class();
-  }
-
   const intptr_t num_explicit_args = explicit_args.Length();
   const intptr_t num_implicit_args = 1;
   const Array& args =
@@ -1442,8 +1418,8 @@
       ArgumentsDescriptor::NewBoxed(kTypeArgsLen, args.Length(), arg_names));
 
   ArgumentsDescriptor args_descriptor(args_descriptor_array);
-  if (!redirected_constructor.AreValidArguments(args_descriptor, NULL)) {
-    external_constructor_name = redirected_constructor.name();
+  if (!lookup_constructor.AreValidArguments(args_descriptor, NULL)) {
+    external_constructor_name = lookup_constructor.name();
     ThrowNoSuchMethod(AbstractType::Handle(klass.RareType()),
                       external_constructor_name, explicit_args, arg_names,
                       InvocationMirror::kConstructor,
@@ -1457,7 +1433,7 @@
   ASSERT(explicit_argument.IsNull());
 #endif
   const Object& type_error =
-      Object::Handle(redirected_constructor.DoArgumentTypesMatch(
+      Object::Handle(lookup_constructor.DoArgumentTypesMatch(
           args, args_descriptor, type_arguments));
   if (!type_error.IsNull()) {
     Exceptions::PropagateError(Error::Cast(type_error));
@@ -1465,7 +1441,7 @@
   }
 
   Instance& new_object = Instance::Handle();
-  if (redirected_constructor.IsGenerativeConstructor()) {
+  if (lookup_constructor.IsGenerativeConstructor()) {
     // Constructors get the uninitialized object.
     // Note we have delayed allocation until after the function
     // type and argument matching checks.
@@ -1484,7 +1460,7 @@
 
   // Invoke the constructor and return the new object.
   const Object& result = Object::Handle(DartEntry::InvokeFunction(
-      redirected_constructor, args, args_descriptor_array));
+      lookup_constructor, args, args_descriptor_array));
   if (result.IsError()) {
     Exceptions::PropagateError(Error::Cast(result));
     UNREACHABLE();
@@ -1493,7 +1469,7 @@
   // Factories may return null.
   ASSERT(result.IsInstance() || result.IsNull());
 
-  if (redirected_constructor.IsGenerativeConstructor()) {
+  if (lookup_constructor.IsGenerativeConstructor()) {
     return new_object.raw();
   } else {
     return result.raw();
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index e6ff59a..4ebbbef 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -962,13 +962,6 @@
     if (function.IsSetterFunction() || function.IsImplicitSetterFunction()) {
       continue;
     }
-    if (function.is_static()) {
-      if (function.IsRedirectingFactory()) {
-        Type& type = Type::Handle(zone, function.RedirectionType());
-        type ^= FinalizeType(type);
-        function.SetRedirectionType(type);
-      }
-    }
   }
 }
 
diff --git a/runtime/vm/class_id.h b/runtime/vm/class_id.h
index 353cb01..4c973f4 100644
--- a/runtime/vm/class_id.h
+++ b/runtime/vm/class_id.h
@@ -23,7 +23,6 @@
   V(Function)                                                                  \
   V(ClosureData)                                                               \
   V(SignatureData)                                                             \
-  V(RedirectionData)                                                           \
   V(FfiTrampolineData)                                                         \
   V(Field)                                                                     \
   V(Script)                                                                    \
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index 7913553..906d5f6 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -988,69 +988,6 @@
   }
 };
 
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class RedirectionDataSerializationCluster : public SerializationCluster {
- public:
-  RedirectionDataSerializationCluster()
-      : SerializationCluster("RedirectionData") {}
-  ~RedirectionDataSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    RedirectionDataPtr data = RedirectionData::RawCast(object);
-    objects_.Add(data);
-    PushFromTo(data);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    s->WriteCid(kRedirectionDataCid);
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      RedirectionDataPtr data = objects_[i];
-      s->AssignRef(data);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      RedirectionDataPtr data = objects_[i];
-      AutoTraceObject(data);
-      WriteFromTo(data);
-    }
-  }
-
- private:
-  GrowableArray<RedirectionDataPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class RedirectionDataDeserializationCluster : public DeserializationCluster {
- public:
-  RedirectionDataDeserializationCluster()
-      : DeserializationCluster("RedirectionData") {}
-  ~RedirectionDataDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d, bool is_canonical) {
-    start_index_ = d->next_index();
-    PageSpace* old_space = d->heap()->old_space();
-    const intptr_t count = d->ReadUnsigned();
-    for (intptr_t i = 0; i < count; i++) {
-      d->AssignRef(
-          AllocateUninitialized(old_space, RedirectionData::InstanceSize()));
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d, bool is_canonical) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      RedirectionDataPtr data = static_cast<RedirectionDataPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(data, kRedirectionDataCid,
-                                     RedirectionData::InstanceSize());
-      ReadFromTo(data);
-    }
-  }
-};
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
 class FieldSerializationCluster : public SerializationCluster {
@@ -5573,8 +5510,6 @@
       return new (Z) ClosureDataSerializationCluster();
     case kSignatureDataCid:
       return new (Z) SignatureDataSerializationCluster();
-    case kRedirectionDataCid:
-      return new (Z) RedirectionDataSerializationCluster();
     case kFfiTrampolineDataCid:
       return new (Z) FfiTrampolineDataSerializationCluster();
     case kFieldCid:
@@ -6269,8 +6204,6 @@
       return new (Z) ClosureDataDeserializationCluster();
     case kSignatureDataCid:
       return new (Z) SignatureDataDeserializationCluster();
-    case kRedirectionDataCid:
-      return new (Z) RedirectionDataDeserializationCluster();
     case kFfiTrampolineDataCid:
       return new (Z) FfiTrampolineDataDeserializationCluster();
     case kFieldCid:
diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc
index 0b503e5..592f55f 100644
--- a/runtime/vm/compiler/aot/precompiler.cc
+++ b/runtime/vm/compiler/aot/precompiler.cc
@@ -633,7 +633,6 @@
   }
 
   ASSERT(!function.is_abstract());
-  ASSERT(!function.IsRedirectingFactory());
 
   error_ = CompileFunction(this, thread_, zone_, function);
   if (!error_.IsNull()) {
@@ -781,9 +780,6 @@
 void Precompiler::AddTypesOf(const Function& function) {
   if (function.IsNull()) return;
   if (functions_to_retain_.ContainsKey(function)) return;
-  // We don't expect to see a reference to a redirecting factory. Only its
-  // target should remain.
-  ASSERT(!function.IsRedirectingFactory());
   functions_to_retain_.Insert(function);
 
   AddTypeArguments(TypeArguments::Handle(Z, function.type_parameters()));
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
index b6bd0e6..e706302 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
@@ -626,9 +626,6 @@
     Function& function = Function::ZoneHandle(
         Z, klass.LookupFunctionAllowPrivate(procedure_name));
     CheckStaticLookup(function);
-    // Redirecting factory must be resolved.
-    ASSERT(!function.IsRedirectingFactory() ||
-           function.RedirectionTarget() != Function::null());
     return function.raw();
   }
 }
diff --git a/runtime/vm/compiler/jit/compiler.cc b/runtime/vm/compiler/jit/compiler.cc
index 90d3903..571907e 100644
--- a/runtime/vm/compiler/jit/compiler.cc
+++ b/runtime/vm/compiler/jit/compiler.cc
@@ -978,8 +978,7 @@
   for (int i = 0; i < functions.Length(); i++) {
     func ^= functions.At(i);
     ASSERT(!func.IsNull());
-    if (!func.HasCode() && !func.is_abstract() &&
-        !func.IsRedirectingFactory()) {
+    if (!func.HasCode() && !func.is_abstract()) {
       result = CompileFunction(thread, func);
       if (result.IsError()) {
         return Error::Cast(result).raw();
diff --git a/runtime/vm/compiler/runtime_api.cc b/runtime/vm/compiler/runtime_api.cc
index 24bfa59..dbe6784 100644
--- a/runtime/vm/compiler/runtime_api.cc
+++ b/runtime/vm/compiler/runtime_api.cc
@@ -978,10 +978,6 @@
   return -kWordSize;
 }
 
-word RedirectionData::NextFieldOffset() {
-  return -kWordSize;
-}
-
 word FfiTrampolineData::NextFieldOffset() {
   return -kWordSize;
 }
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index ce2d164..b7ad7e2 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -774,12 +774,6 @@
   static word NextFieldOffset();
 };
 
-class RedirectionData : public AllStatic {
- public:
-  static word InstanceSize();
-  static word NextFieldOffset();
-};
-
 class FfiTrampolineData : public AllStatic {
  public:
   static word InstanceSize();
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index 7263afe..f5b0be5 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -498,7 +498,6 @@
 static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 8;
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 12;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 20;
-static constexpr dart::compiler::target::word RedirectionData_InstanceSize = 16;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 60;
 static constexpr dart::compiler::target::word Script_InstanceSize = 56;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
@@ -1018,7 +1017,6 @@
 static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 16;
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 40;
-static constexpr dart::compiler::target::word RedirectionData_InstanceSize = 32;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 120;
 static constexpr dart::compiler::target::word Script_InstanceSize = 96;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
@@ -1529,7 +1527,6 @@
 static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 8;
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 12;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 20;
-static constexpr dart::compiler::target::word RedirectionData_InstanceSize = 16;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 60;
 static constexpr dart::compiler::target::word Script_InstanceSize = 56;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
@@ -2050,7 +2047,6 @@
 static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 16;
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 40;
-static constexpr dart::compiler::target::word RedirectionData_InstanceSize = 32;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 120;
 static constexpr dart::compiler::target::word Script_InstanceSize = 96;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
@@ -2560,7 +2556,6 @@
 static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 8;
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 12;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 12;
-static constexpr dart::compiler::target::word RedirectionData_InstanceSize = 16;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 60;
 static constexpr dart::compiler::target::word Script_InstanceSize = 56;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
@@ -3074,7 +3069,6 @@
 static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 16;
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 24;
-static constexpr dart::compiler::target::word RedirectionData_InstanceSize = 32;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 120;
 static constexpr dart::compiler::target::word Script_InstanceSize = 96;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
@@ -3579,7 +3573,6 @@
 static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 8;
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 12;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 12;
-static constexpr dart::compiler::target::word RedirectionData_InstanceSize = 16;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 60;
 static constexpr dart::compiler::target::word Script_InstanceSize = 56;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
@@ -4094,7 +4087,6 @@
 static constexpr dart::compiler::target::word PcDescriptors_HeaderSize = 16;
 static constexpr dart::compiler::target::word Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word ReceivePort_InstanceSize = 24;
-static constexpr dart::compiler::target::word RedirectionData_InstanceSize = 32;
 static constexpr dart::compiler::target::word RegExp_InstanceSize = 120;
 static constexpr dart::compiler::target::word Script_InstanceSize = 96;
 static constexpr dart::compiler::target::word SendPort_InstanceSize = 24;
@@ -4660,8 +4652,6 @@
 static constexpr dart::compiler::target::word AOT_PcDescriptors_HeaderSize = 8;
 static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 12;
 static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 20;
-static constexpr dart::compiler::target::word AOT_RedirectionData_InstanceSize =
-    16;
 static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 60;
 static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 56;
 static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
@@ -5234,8 +5224,6 @@
 static constexpr dart::compiler::target::word AOT_PcDescriptors_HeaderSize = 16;
 static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 40;
-static constexpr dart::compiler::target::word AOT_RedirectionData_InstanceSize =
-    32;
 static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 120;
 static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 96;
 static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
@@ -5812,8 +5800,6 @@
 static constexpr dart::compiler::target::word AOT_PcDescriptors_HeaderSize = 16;
 static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 40;
-static constexpr dart::compiler::target::word AOT_RedirectionData_InstanceSize =
-    32;
 static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 120;
 static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 96;
 static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
@@ -6378,8 +6364,6 @@
 static constexpr dart::compiler::target::word AOT_PcDescriptors_HeaderSize = 8;
 static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 12;
 static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 12;
-static constexpr dart::compiler::target::word AOT_RedirectionData_InstanceSize =
-    16;
 static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 60;
 static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 56;
 static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
@@ -6945,8 +6929,6 @@
 static constexpr dart::compiler::target::word AOT_PcDescriptors_HeaderSize = 16;
 static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 24;
-static constexpr dart::compiler::target::word AOT_RedirectionData_InstanceSize =
-    32;
 static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 120;
 static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 96;
 static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
@@ -7516,8 +7498,6 @@
 static constexpr dart::compiler::target::word AOT_PcDescriptors_HeaderSize = 16;
 static constexpr dart::compiler::target::word AOT_Pointer_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_ReceivePort_InstanceSize = 24;
-static constexpr dart::compiler::target::word AOT_RedirectionData_InstanceSize =
-    32;
 static constexpr dart::compiler::target::word AOT_RegExp_InstanceSize = 120;
 static constexpr dart::compiler::target::word AOT_Script_InstanceSize = 96;
 static constexpr dart::compiler::target::word AOT_SendPort_InstanceSize = 24;
diff --git a/runtime/vm/compiler/runtime_offsets_list.h b/runtime/vm/compiler/runtime_offsets_list.h
index 2aa714c..f54a380 100644
--- a/runtime/vm/compiler/runtime_offsets_list.h
+++ b/runtime/vm/compiler/runtime_offsets_list.h
@@ -348,7 +348,6 @@
   SIZEOF(PcDescriptors, HeaderSize, PcDescriptorsLayout)                       \
   SIZEOF(Pointer, InstanceSize, PointerLayout)                                 \
   SIZEOF(ReceivePort, InstanceSize, ReceivePortLayout)                         \
-  SIZEOF(RedirectionData, InstanceSize, RedirectionDataLayout)                 \
   SIZEOF(RegExp, InstanceSize, RegExpLayout)                                   \
   SIZEOF(Script, InstanceSize, ScriptLayout)                                   \
   SIZEOF(SendPort, InstanceSize, SendPortLayout)                               \
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 53bfe24..c64c7a1 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -4511,26 +4511,6 @@
   constructor ^= result.raw();
 
   Instance& new_object = Instance::Handle(Z);
-  if (constructor.IsRedirectingFactory()) {
-    Type& redirect_type = Type::Handle(constructor.RedirectionType());
-    constructor = constructor.RedirectionTarget();
-    ASSERT(!constructor.IsNull());
-
-    if (!redirect_type.IsInstantiated()) {
-      // The type arguments of the redirection type are instantiated from the
-      // type arguments of the type argument.
-      // We do not support generic constructors.
-      ASSERT(redirect_type.IsInstantiated(kFunctions));
-      redirect_type ^= redirect_type.InstantiateFrom(
-          type_arguments, Object::null_type_arguments(), kNoneFree, Heap::kNew);
-      redirect_type ^= redirect_type.Canonicalize(T, nullptr);
-    }
-
-    type_obj = redirect_type.raw();
-    type_arguments = redirect_type.arguments();
-
-    cls = type_obj.type_class();
-  }
   if (constructor.IsGenerativeConstructor()) {
     CHECK_ERROR_HANDLE(cls.VerifyEntryPoint());
 #if defined(DEBUG)
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 3f24672..bfce47e 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -146,7 +146,6 @@
 ClassPtr Object::function_class_ = static_cast<ClassPtr>(RAW_NULL);
 ClassPtr Object::closure_data_class_ = static_cast<ClassPtr>(RAW_NULL);
 ClassPtr Object::signature_data_class_ = static_cast<ClassPtr>(RAW_NULL);
-ClassPtr Object::redirection_data_class_ = static_cast<ClassPtr>(RAW_NULL);
 ClassPtr Object::ffi_trampoline_data_class_ = static_cast<ClassPtr>(RAW_NULL);
 ClassPtr Object::field_class_ = static_cast<ClassPtr>(RAW_NULL);
 ClassPtr Object::script_class_ = static_cast<ClassPtr>(RAW_NULL);
@@ -788,9 +787,6 @@
   cls = Class::New<SignatureData, RTN::SignatureData>(isolate);
   signature_data_class_ = cls.raw();
 
-  cls = Class::New<RedirectionData, RTN::RedirectionData>(isolate);
-  redirection_data_class_ = cls.raw();
-
   cls = Class::New<FfiTrampolineData, RTN::FfiTrampolineData>(isolate);
   ffi_trampoline_data_class_ = cls.raw();
 
@@ -1221,7 +1217,6 @@
   function_class_ = static_cast<ClassPtr>(RAW_NULL);
   closure_data_class_ = static_cast<ClassPtr>(RAW_NULL);
   signature_data_class_ = static_cast<ClassPtr>(RAW_NULL);
-  redirection_data_class_ = static_cast<ClassPtr>(RAW_NULL);
   ffi_trampoline_data_class_ = static_cast<ClassPtr>(RAW_NULL);
   field_class_ = static_cast<ClassPtr>(RAW_NULL);
   script_class_ = static_cast<ClassPtr>(RAW_NULL);
@@ -1322,7 +1317,6 @@
   SET_CLASS_NAME(function, Function);
   SET_CLASS_NAME(closure_data, ClosureData);
   SET_CLASS_NAME(signature_data, SignatureData);
-  SET_CLASS_NAME(redirection_data, RedirectionData);
   SET_CLASS_NAME(ffi_trampoline_data, FfiTrampolineData);
   SET_CLASS_NAME(field, Field);
   SET_CLASS_NAME(script, Script);
@@ -4754,8 +4748,6 @@
       return Symbols::ClosureData().ToCString();
     case kSignatureDataCid:
       return Symbols::SignatureData().ToCString();
-    case kRedirectionDataCid:
-      return Symbols::RedirectionData().ToCString();
     case kFfiTrampolineDataCid:
       return Symbols::FfiTrampolineData().ToCString();
     case kFieldCid:
@@ -7271,70 +7263,10 @@
   }
 }
 
-bool Function::IsRedirectingFactory() const {
-  if (!IsFactory() || !is_redirecting()) {
-    return false;
-  }
-  ASSERT(!IsClosureFunction());  // A factory cannot also be a closure.
-  return true;
-}
-
-TypePtr Function::RedirectionType() const {
-  ASSERT(IsRedirectingFactory());
-  ASSERT(!is_native());
-  const Object& obj = Object::Handle(raw_ptr()->data_);
-  ASSERT(!obj.IsNull());
-  return RedirectionData::Cast(obj).type();
-}
-
 const char* Function::KindToCString(FunctionLayout::Kind kind) {
   return FunctionLayout::KindToCString(kind);
 }
 
-void Function::SetRedirectionType(const Type& type) const {
-  ASSERT(IsFactory());
-  Object& obj = Object::Handle(raw_ptr()->data_);
-  if (obj.IsNull()) {
-    obj = RedirectionData::New();
-    set_data(obj);
-  }
-  RedirectionData::Cast(obj).set_type(type);
-}
-
-StringPtr Function::RedirectionIdentifier() const {
-  ASSERT(IsRedirectingFactory());
-  const Object& obj = Object::Handle(raw_ptr()->data_);
-  ASSERT(!obj.IsNull());
-  return RedirectionData::Cast(obj).identifier();
-}
-
-void Function::SetRedirectionIdentifier(const String& identifier) const {
-  ASSERT(IsFactory());
-  Object& obj = Object::Handle(raw_ptr()->data_);
-  if (obj.IsNull()) {
-    obj = RedirectionData::New();
-    set_data(obj);
-  }
-  RedirectionData::Cast(obj).set_identifier(identifier);
-}
-
-FunctionPtr Function::RedirectionTarget() const {
-  ASSERT(IsRedirectingFactory());
-  const Object& obj = Object::Handle(raw_ptr()->data_);
-  ASSERT(!obj.IsNull());
-  return RedirectionData::Cast(obj).target();
-}
-
-void Function::SetRedirectionTarget(const Function& target) const {
-  ASSERT(IsFactory());
-  Object& obj = Object::Handle(raw_ptr()->data_);
-  if (obj.IsNull()) {
-    obj = RedirectionData::New();
-    set_data(obj);
-  }
-  RedirectionData::Cast(obj).set_target(target);
-}
-
 FunctionPtr Function::ForwardingTarget() const {
   ASSERT(kind() == FunctionLayout::kDynamicInvocationForwarder);
   Array& checks = Array::Handle();
@@ -7362,7 +7294,6 @@
 //   field initializer:       Field
 //   noSuchMethod dispatcher: Array arguments descriptor
 //   invoke-field dispatcher: Array arguments descriptor
-//   redirecting constructor: RedirectionData
 //   closure function:        ClosureData
 //   irregexp function:       Array[0] = RegExp
 //                            Array[1] = Smi string specialization cid
@@ -8650,7 +8581,6 @@
   result.set_is_visible(true);      // Will be computed later.
   result.set_is_debuggable(true);   // Will be computed later.
   result.set_is_intrinsic(false);
-  result.set_is_redirecting(false);
   result.set_is_generated_body(false);
   result.set_has_pragma(false);
   result.set_is_polymorphic_target(false);
@@ -9895,40 +9825,6 @@
                      type.IsNull() ? "null" : type.ToCString());
 }
 
-void RedirectionData::set_type(const Type& value) const {
-  ASSERT(!value.IsNull());
-  StorePointer(&raw_ptr()->type_, value.raw());
-}
-
-void RedirectionData::set_identifier(const String& value) const {
-  StorePointer(&raw_ptr()->identifier_, value.raw());
-}
-
-void RedirectionData::set_target(const Function& value) const {
-  StorePointer(&raw_ptr()->target_, value.raw());
-}
-
-RedirectionDataPtr RedirectionData::New() {
-  ASSERT(Object::redirection_data_class() != Class::null());
-  ObjectPtr raw = Object::Allocate(RedirectionData::kClassId,
-                                   RedirectionData::InstanceSize(), Heap::kOld);
-  return static_cast<RedirectionDataPtr>(raw);
-}
-
-const char* RedirectionData::ToCString() const {
-  if (IsNull()) {
-    return "RedirectionData: null";
-  }
-  const Type& redir_type = Type::Handle(type());
-  const String& ident = String::Handle(identifier());
-  const Function& target_fun = Function::Handle(target());
-  return OS::SCreate(Thread::Current()->zone(),
-                     "RedirectionData: type: %s identifier: %s target: %s",
-                     redir_type.IsNull() ? "null" : redir_type.ToCString(),
-                     ident.IsNull() ? "null" : ident.ToCString(),
-                     target_fun.IsNull() ? "null" : target_fun.ToCString());
-}
-
 void FfiTrampolineData::set_signature_type(const Type& value) const {
   StorePointer(&raw_ptr()->signature_type_, value.raw());
 }
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 098db27..21476d9 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -466,7 +466,6 @@
   static ClassPtr function_class() { return function_class_; }
   static ClassPtr closure_data_class() { return closure_data_class_; }
   static ClassPtr signature_data_class() { return signature_data_class_; }
-  static ClassPtr redirection_data_class() { return redirection_data_class_; }
   static ClassPtr ffi_trampoline_data_class() {
     return ffi_trampoline_data_class_;
   }
@@ -772,7 +771,6 @@
   static ClassPtr function_class_;        // Class of the Function vm object.
   static ClassPtr closure_data_class_;    // Class of ClosureData vm obj.
   static ClassPtr signature_data_class_;  // Class of SignatureData vm obj.
-  static ClassPtr redirection_data_class_;  // Class of RedirectionData vm obj.
   static ClassPtr ffi_trampoline_data_class_;  // Class of FfiTrampolineData
                                                // vm obj.
   static ClassPtr field_class_;                // Class of the Field vm object.
@@ -2817,15 +2815,6 @@
 
   intptr_t ComputeClosureHash() const;
 
-  // Redirection information for a redirecting factory.
-  bool IsRedirectingFactory() const;
-  TypePtr RedirectionType() const;
-  void SetRedirectionType(const Type& type) const;
-  StringPtr RedirectionIdentifier() const;
-  void SetRedirectionIdentifier(const String& identifier) const;
-  FunctionPtr RedirectionTarget() const;
-  void SetRedirectionTarget(const Function& target) const;
-
   FunctionPtr ForwardingTarget() const;
   void SetForwardingChecks(const Array& checks) const;
 
@@ -3670,7 +3659,6 @@
   //            don't support during inlining (e.g., optional parameters),
   //            functions which are too big, etc.
   // native: Bridge to C/C++ code.
-  // redirecting: Redirecting generative or factory constructor.
   // external: Just a declaration that expects to be defined in another patch
   //           file.
   // generated_body: Has a generated body.
@@ -3688,7 +3676,6 @@
   V(Inlinable, is_inlinable)                                                   \
   V(Intrinsic, is_intrinsic)                                                   \
   V(Native, is_native)                                                         \
-  V(Redirecting, is_redirecting)                                               \
   V(External, is_external)                                                     \
   V(GeneratedBody, is_generated_body)                                          \
   V(PolymorphicTarget, is_polymorphic_target)                                  \
@@ -3886,33 +3873,6 @@
   friend class HeapProfiler;
 };
 
-class RedirectionData : public Object {
- public:
-  static intptr_t InstanceSize() {
-    return RoundedAllocationSize(sizeof(RedirectionDataLayout));
-  }
-
- private:
-  // The type specifies the class and type arguments of the target constructor.
-  TypePtr type() const { return raw_ptr()->type_; }
-  void set_type(const Type& value) const;
-
-  // The optional identifier specifies a named constructor.
-  StringPtr identifier() const { return raw_ptr()->identifier_; }
-  void set_identifier(const String& value) const;
-
-  // The resolved constructor or factory target of the redirection.
-  FunctionPtr target() const { return raw_ptr()->target_; }
-  void set_target(const Function& value) const;
-
-  static RedirectionDataPtr New();
-
-  FINAL_HEAP_OBJECT_IMPLEMENTATION(RedirectionData, Object);
-  friend class Class;
-  friend class Function;
-  friend class HeapProfiler;
-};
-
 enum class EntryPointPragma {
   kAlways,
   kNever,
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index e99a13d..802d7a4 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -352,10 +352,6 @@
   }
 }
 
-void RedirectionData::PrintJSONImpl(JSONStream* stream, bool ref) const {
-  Object::PrintJSONImpl(stream, ref);
-}
-
 void FfiTrampolineData::PrintJSONImpl(JSONStream* stream, bool ref) const {
   Object::PrintJSONImpl(stream, ref);
 }
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index 3f3bec6..c846712 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -506,7 +506,6 @@
 COMPRESSED_VISITOR(Closure)
 REGULAR_VISITOR(ClosureData)
 REGULAR_VISITOR(SignatureData)
-REGULAR_VISITOR(RedirectionData)
 REGULAR_VISITOR(FfiTrampolineData)
 REGULAR_VISITOR(Script)
 REGULAR_VISITOR(Library)
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 0c40cad..8cd6c5a 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -1127,18 +1127,6 @@
   friend class Function;
 };
 
-class RedirectionDataLayout : public ObjectLayout {
- private:
-  RAW_HEAP_OBJECT_IMPLEMENTATION(RedirectionData);
-
-  VISIT_FROM(ObjectPtr, type_);
-  TypePtr type_;
-  StringPtr identifier_;
-  FunctionPtr target_;
-  VISIT_TO(ObjectPtr, target_);
-  ObjectPtr* to_snapshot(Snapshot::Kind kind) { return to(); }
-};
-
 class FfiTrampolineDataLayout : public ObjectLayout {
  private:
   RAW_HEAP_OBJECT_IMPLEMENTATION(FfiTrampolineData);
diff --git a/runtime/vm/raw_object_fields.cc b/runtime/vm/raw_object_fields.cc
index d810d3d..e4ffd3e 100644
--- a/runtime/vm/raw_object_fields.cc
+++ b/runtime/vm/raw_object_fields.cc
@@ -47,9 +47,6 @@
   F(ClosureData, closure_)                                                     \
   F(SignatureData, parent_function_)                                           \
   F(SignatureData, signature_type_)                                            \
-  F(RedirectionData, type_)                                                    \
-  F(RedirectionData, identifier_)                                              \
-  F(RedirectionData, target_)                                                  \
   F(Field, name_)                                                              \
   F(Field, owner_)                                                             \
   F(Field, type_)                                                              \
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 1b7f6ba..674307f 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -567,7 +567,6 @@
 MESSAGE_SNAPSHOT_UNREACHABLE(ObjectPool);
 MESSAGE_SNAPSHOT_UNREACHABLE(PatchClass);
 MESSAGE_SNAPSHOT_UNREACHABLE(PcDescriptors);
-MESSAGE_SNAPSHOT_UNREACHABLE(RedirectionData);
 MESSAGE_SNAPSHOT_UNREACHABLE(Script);
 MESSAGE_SNAPSHOT_UNREACHABLE(SignatureData);
 MESSAGE_SNAPSHOT_UNREACHABLE(SingleTargetCache);
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index 90e62a0..2d15658 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -398,7 +398,6 @@
   friend class MirrorReference;
   friend class Namespace;
   friend class PatchClass;
-  friend class RedirectionData;
   friend class RegExp;
   friend class Script;
   friend class SignatureData;
diff --git a/runtime/vm/source_report.cc b/runtime/vm/source_report.cc
index 4ed6a46..84f5495 100644
--- a/runtime/vm/source_report.cc
+++ b/runtime/vm/source_report.cc
@@ -105,7 +105,7 @@
       return true;
   }
   if (func.is_abstract() || func.IsImplicitConstructor() ||
-      func.IsRedirectingFactory() || func.is_synthetic()) {
+      func.is_synthetic()) {
     return true;
   }
   if (func.IsNonImplicitClosureFunction() &&
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index b654d69..0a40d7d 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -241,7 +241,6 @@
   V(QuoteIsNotASubtypeOf, "' is not a subtype of ")                            \
   V(RParenArrow, ") => ")                                                      \
   V(RangeError, "RangeError")                                                  \
-  V(RedirectionData, "RedirectionData")                                        \
   V(RegExp, "RegExp")                                                          \
   V(RightShiftOperator, ">>")                                                  \
   V(SavedTryContextVar, ":saved_try_context_var")                              \
diff --git a/runtime/vm/tagged_pointer.h b/runtime/vm/tagged_pointer.h
index 703dfabd..4954982 100644
--- a/runtime/vm/tagged_pointer.h
+++ b/runtime/vm/tagged_pointer.h
@@ -234,7 +234,6 @@
 DEFINE_TAGGED_POINTER(Function, Object)
 DEFINE_TAGGED_POINTER(ClosureData, Object)
 DEFINE_TAGGED_POINTER(SignatureData, Object)
-DEFINE_TAGGED_POINTER(RedirectionData, Object)
 DEFINE_TAGGED_POINTER(FfiTrampolineData, Object)
 DEFINE_TAGGED_POINTER(Field, Object)
 DEFINE_TAGGED_POINTER(Script, Object)