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

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

Issue 1381793002: Revert "dart2js: improve ssa utilization of bool value types" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/cps_ir/type_mask_system.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index c1d51cc2f797f663aa49234eebffef938b083be1..df00807da25519444f7223f320c81e2e5e701fd7 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -928,11 +928,10 @@ class DynamicCallSiteTypeInformation extends CallSiteTypeInformation {
return containerTypeMask.elementType;
} else if (inferrer.returnsMapValueType(selector, typeMask)) {
if (typeMask.isDictionary &&
- arguments.positional[0].type.isValue &&
- arguments.positional[0].type.value.isString) {
+ arguments.positional[0].type.isValue) {
DictionaryTypeMask dictionaryTypeMask = typeMask;
ValueTypeMask arg = arguments.positional[0].type;
- String key = arg.value.primitiveValue.slowToString();
+ String key = arg.value;
if (dictionaryTypeMask.typeMap.containsKey(key)) {
if (_VERBOSE) {
print("Dictionary lookup for $key yields "
@@ -1117,7 +1116,7 @@ class StringLiteralTypeInformation extends ConcreteTypeInformation {
final ast.DartString value;
StringLiteralTypeInformation(value, TypeMask mask)
- : super(new ValueTypeMask(mask, new StringConstantValue(value))),
+ : super(new ValueTypeMask(mask, value.slowToString())),
this.value = value;
String asString() => value.slowToString();
@@ -1132,8 +1131,7 @@ class BoolLiteralTypeInformation extends ConcreteTypeInformation {
final ast.LiteralBool value;
BoolLiteralTypeInformation(value, TypeMask mask)
- : super(new ValueTypeMask(mask,
- value.value ? new TrueConstantValue() : new FalseConstantValue())),
+ : super(new ValueTypeMask(mask, value.value)),
this.value = value;
String toString() => 'Type $type value ${value.value}';
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_mask_system.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698