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

Unified Diff: pkg/compiler/lib/src/inferrer/kernel_inferrer_engine.dart

Issue 3009593002: It's alive (first kernel inference test) (Closed)
Patch Set: Updated cf. comment Created 3 years, 4 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
Index: pkg/compiler/lib/src/inferrer/kernel_inferrer_engine.dart
diff --git a/pkg/compiler/lib/src/inferrer/kernel_inferrer_engine.dart b/pkg/compiler/lib/src/inferrer/kernel_inferrer_engine.dart
index 73e9ea8881bc8ccf15045a23e9f48e38ceb00680..fcda3b859437b9c00c42d1d0c6d114b11a1f80d6 100644
--- a/pkg/compiler/lib/src/inferrer/kernel_inferrer_engine.dart
+++ b/pkg/compiler/lib/src/inferrer/kernel_inferrer_engine.dart
@@ -97,23 +97,25 @@ class KernelInferrerEngine extends InferrerEngineImpl<ir.Node> {
new KernelTypeSystemStrategy(
_elementMap, _globalLocalsMap, _closureDataLookup));
+ ElementEnvironment get _elementEnvironment => _elementMap.elementEnvironment;
+
@override
ConstantValue getFieldConstant(FieldEntity field) {
- throw new UnimplementedError('KernelInferrerEngine.getFieldConstant');
+ return _elementMap.getFieldConstantValue(field);
}
@override
bool isFieldInitializerPotentiallyNull(
FieldEntity field, ir.Node initializer) {
- throw new UnimplementedError(
- 'KernelInferrerEngine.isFieldInitializerPotentiallyNull');
+ // TODO(johnniwinther): Implement the ad-hoc check in ast inferrer?
+ return true;
}
@override
TypeInformation computeMemberTypeInformation(
MemberEntity member, ir.Node body) {
KernelTypeGraphBuilder visitor =
- new KernelTypeGraphBuilder(member, compiler, _elementMap, this);
+ new KernelTypeGraphBuilder(member, compiler, _elementMap, this, body);
return visitor.run();
}
« no previous file with comments | « pkg/compiler/lib/src/inferrer/builder_kernel.dart ('k') | pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698