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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/types.dart

Issue 12528008: Implement CHA through type mask and TypedSelector in the simple type inferrer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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: sdk/lib/_internal/compiler/implementation/ssa/types.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/types.dart (revision 19670)
+++ sdk/lib/_internal/compiler/implementation/ssa/types.dart (working copy)
@@ -82,18 +82,6 @@
factory HType.fromInferredType(TypeMask mask, Compiler compiler) {
if (mask == null) return HType.UNKNOWN;
- if (mask.isExact) {
- // Special case the list and map classes that are used as types
- // for literals in the type inferrer.
- if (mask.base.element == compiler.listClass) {
- return HType.READABLE_ARRAY;
- } else if (mask.base.element == compiler.mapClass) {
- // TODO(ngeoffray): get the actual implementation of a map
- // literal.
- return new HType.nonNullSubtype(
- compiler.mapLiteralClass.rawType, compiler);
- }
- }
return new HType.fromMask(mask, compiler);
}
@@ -110,6 +98,12 @@
compiler);
}
+ factory HType.inferredTypeForSelector(Selector selector, Compiler compiler) {
+ return new HType.fromInferredType(
+ compiler.typesTask.getGuaranteedTypeOfSelector(selector),
+ compiler);
+ }
+
factory HType.inferredForNode(Element owner, Node node, Compiler compiler) {
return new HType.fromInferredType(
compiler.typesTask.getGuaranteedTypeOfNode(owner, node),

Powered by Google App Engine
This is Rietveld 408576698