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

Unified Diff: pkg/compiler/lib/src/cps_ir/type_mask_system.dart

Issue 1416723008: dart2js cps: Propagate container types for lists. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove unreachable handling of list constructor in type propagation Created 5 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 | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/type_mask_system.dart
diff --git a/pkg/compiler/lib/src/cps_ir/type_mask_system.dart b/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
index f8f562cad7faf425e6c9e1b38006a8016baed12e..735bed62a6382753811a198d15c9df18e00aa154 100644
--- a/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
@@ -14,6 +14,7 @@ import '../js_backend/js_backend.dart' show JavaScriptBackend;
import '../types/types.dart';
import '../types/constants.dart' show computeTypeMask;
import '../universe/selector.dart' show Selector;
+import '../universe/call_structure.dart' show CallStructure;
import '../world.dart' show World;
enum AbstractBool {
@@ -37,7 +38,10 @@ class TypeMaskSystem {
TypeMask get mapType => inferrer.mapType;
TypeMask get nonNullType => inferrer.nonNullType;
TypeMask get nullType => inferrer.nullType;
- TypeMask get extendableNativeListType => backend.extendableArrayType;
+ TypeMask get extendableArrayType => backend.extendableArrayType;
+ TypeMask get fixedArrayType => backend.fixedArrayType;
+ TypeMask get arrayType =>
+ new TypeMask.nonNullSubclass(helpers.jsArrayClass, classWorld);
TypeMask get uint31Type => inferrer.uint31Type;
TypeMask get uint32Type => inferrer.uint32Type;
@@ -251,25 +255,22 @@ class TypeMaskSystem {
return t.satisfies(helpers.jsPositiveIntClass, classWorld);
}
- // TODO(sra): Find a better name. 'NativeList' is a bad name because there
- // are many native classes in dart:html that implement List but are not (and
- // should not be) included in this predicate.
- bool isDefinitelyNativeList(TypeMask t, {bool allowNull: false}) {
+ bool isDefinitelyArray(TypeMask t, {bool allowNull: false}) {
if (!allowNull && t.isNullable) return false;
return t.nonNullable().satisfies(helpers.jsArrayClass, classWorld);
}
- bool isDefinitelyMutableNativeList(TypeMask t, {bool allowNull: false}) {
+ bool isDefinitelyMutableArray(TypeMask t, {bool allowNull: false}) {
if (!allowNull && t.isNullable) return false;
return t.nonNullable().satisfies(helpers.jsMutableArrayClass, classWorld);
}
- bool isDefinitelyFixedNativeList(TypeMask t, {bool allowNull: false}) {
+ bool isDefinitelyFixedArray(TypeMask t, {bool allowNull: false}) {
if (!allowNull && t.isNullable) return false;
return t.nonNullable().satisfies(helpers.jsFixedArrayClass, classWorld);
}
- bool isDefinitelyExtendableNativeList(TypeMask t, {bool allowNull: false}) {
+ bool isDefinitelyExtendableArray(TypeMask t, {bool allowNull: false}) {
if (!allowNull && t.isNullable) return false;
return t.nonNullable().satisfies(helpers.jsExtendableArrayClass,
classWorld);
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698