Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: runtime/vm/kernel_reader.cc

Issue 2466413004: [Kernel] Remove handling of mixin classes, since they are desugared in the frontend (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_reader.cc
diff --git a/runtime/vm/kernel_reader.cc b/runtime/vm/kernel_reader.cc
index 4eb6001a98c7fefca2559251db5d7aa85c75ba96..aa2d8138833a0ca4745e0a4c0299eadb1779765a 100644
--- a/runtime/vm/kernel_reader.cc
+++ b/runtime/vm/kernel_reader.cc
@@ -225,6 +225,9 @@ void KernelReader::ReadLibrary(Library* kernel_library) {
void KernelReader::ReadPreliminaryClass(dart::Class* klass,
Class* kernel_klass) {
+ ASSERT(kernel_klass->IsNormalClass());
+ NormalClass* kernel_normal_class = NormalClass::Cast(kernel_klass);
+
ActiveClassScope active_class_scope(&active_class_, kernel_klass, klass);
// First setup the type parameters, so if any of the following code uses it
@@ -268,33 +271,12 @@ void KernelReader::ReadPreliminaryClass(dart::Class* klass,
}
}
- if (kernel_klass->IsNormalClass()) {
- NormalClass* kernel_normal_class = NormalClass::Cast(kernel_klass);
-
- // Set super type. Some classes (e.g., Object) do not have one.
- if (kernel_normal_class->super_class() != NULL) {
- AbstractType& super_type = T.TranslateTypeWithoutFinalization(
- kernel_normal_class->super_class());
- if (super_type.IsMalformed()) H.ReportError("Malformed super type");
- klass->set_super_type(super_type);
- }
- } else {
- MixinClass* kernel_mixin = MixinClass::Cast(kernel_klass);
-
- // Set super type.
- AbstractType& super_type =
- T.TranslateTypeWithoutFinalization(kernel_mixin->first());
- if (super_type.IsMalformed()) H.ReportError("Malformed super type.");
+ // Set super type. Some classes (e.g., Object) do not have one.
+ if (kernel_normal_class->super_class() != NULL) {
+ AbstractType& super_type = T.TranslateTypeWithoutFinalization(
+ kernel_normal_class->super_class());
+ if (super_type.IsMalformed()) H.ReportError("Malformed super type");
klass->set_super_type(super_type);
-
- // Tell the rest of the system there is nothing to resolve.
- super_type.SetIsResolved();
-
- // Set mixin type.
- AbstractType& mixin_type =
- T.TranslateTypeWithoutFinalization(kernel_mixin->second());
- if (mixin_type.IsMalformed()) H.ReportError("Malformed mixin type.");
- klass->set_mixin(Type::Cast(mixin_type));
}
// Build implemented interface types
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698