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

Unified Diff: pkg/compiler/lib/src/kernel/elements.dart

Issue 2679913006: Add KernelNativeBehaviorComputer (Closed)
Patch Set: Rebased Created 3 years, 10 months 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 | « pkg/compiler/lib/src/kernel/element_adapter.dart ('k') | pkg/compiler/lib/src/kernel/world_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/elements.dart
diff --git a/pkg/compiler/lib/src/kernel/elements.dart b/pkg/compiler/lib/src/kernel/elements.dart
index a2fb8eb8fbf5e4af007d6507371c9fb2bce9c509..b882bcf117c7aaa6724d3f4434017ead8047233c 100644
--- a/pkg/compiler/lib/src/kernel/elements.dart
+++ b/pkg/compiler/lib/src/kernel/elements.dart
@@ -79,7 +79,11 @@ abstract class KFunction extends KMember implements FunctionEntity {
}
abstract class KConstructor extends KFunction implements ConstructorEntity {
- KConstructor(KClass enclosingClass, Name name) : super(enclosingClass, name);
+ /// Constructor index used for fast lookup in [KernelWorldBuilder].
+ final int constructorIndex;
+
+ KConstructor(this.constructorIndex, KClass enclosingClass, Name name)
+ : super(enclosingClass, name);
@override
bool get isConstructor => true;
@@ -97,8 +101,8 @@ abstract class KConstructor extends KFunction implements ConstructorEntity {
}
class KGenerativeConstructor extends KConstructor {
- KGenerativeConstructor(KClass enclosingClass, Name name)
- : super(enclosingClass, name);
+ KGenerativeConstructor(int constructorIndex, KClass enclosingClass, Name name)
+ : super(constructorIndex, enclosingClass, name);
@override
bool get isFactoryConstructor => false;
@@ -108,8 +112,8 @@ class KGenerativeConstructor extends KConstructor {
}
class KFactoryConstructor extends KConstructor {
- KFactoryConstructor(KClass enclosingClass, Name name)
- : super(enclosingClass, name);
+ KFactoryConstructor(int constructorIndex, KClass enclosingClass, Name name)
+ : super(constructorIndex, enclosingClass, name);
@override
bool get isFactoryConstructor => true;
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_adapter.dart ('k') | pkg/compiler/lib/src/kernel/world_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698