Revert "[vm] Assert that we are not trying to construct old(reloaded) class constructor."
This reverts commit ff3a841e2dc18ebe27ff02eb7aa02debabe28d8d as it
breaks quite a few reload buildbots tests.
Change-Id: I6e1d0bc6b69d4349e2ee47cb3419ec90ea129384
Reviewed-on: https://dart-review.googlesource.com/c/78380
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index 04b0b58..38a9a18 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -1555,13 +1555,6 @@
// initializers will be visible inside the entire body of the constructor.
// We should make a separate scope for them.
if (constructor) {
- // PatchClass with different kernel_data means we are building a constructor
- // for some old class. That is not supported and should not be happening as
- // old classes are gone after hot reload, we don't have reference to old
- // class's fields.
- ASSERT(!Object::Handle(dart_function.RawOwner()).IsPatchClass() ||
- (Library::Handle(Class::Handle(dart_function.Owner()).library())
- .kernel_data() == dart_function.KernelData()));
body += BuildInitializers(Class::Handle(Z, dart_function.Owner()));
}