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

Unified Diff: pkg/compiler/lib/src/constants/values.dart

Issue 1153243003: dart2js: Use frequency of occurence to sort metadata indices. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/constants/values.dart
diff --git a/pkg/compiler/lib/src/constants/values.dart b/pkg/compiler/lib/src/constants/values.dart
index e40a6b838ac1dea110fc78cdacc932f3dbfa99e5..ef858a620e98dbc37a6080edf4ae79d57579858e 100644
--- a/pkg/compiler/lib/src/constants/values.dart
+++ b/pkg/compiler/lib/src/constants/values.dart
@@ -603,20 +603,20 @@ class InterceptorConstantValue extends ConstantValue {
}
}
-// TODO(johnniwinther): Remove this class.
class DummyConstantValue extends ConstantValue {
Johnni Winther 2015/05/28 12:07:17 Rename to SyntheticConstantValue, ForeignConstantV
herhut 2015/06/01 12:09:41 I went for SyntheticConstantValue.
- final ti.TypeMask typeMask;
+ final payload;
sra1 2015/05/27 19:38:50 TL;DR: should this class be split into 2 to 3 clas
herhut 2015/06/01 12:09:41 The idea is that these constants are opaque to the
+ final String kind;
- DummyConstantValue(this.typeMask);
+ DummyConstantValue(this.kind, this.payload);
bool get isDummy => true;
bool operator ==(other) {
return other is DummyConstantValue
- && typeMask == other.typeMask;
+ && payload == other.payload;
}
- get hashCode => typeMask.hashCode;
+ get hashCode => payload.hashCode;
List<ConstantValue> getDependencies() => const <ConstantValue>[];
@@ -624,9 +624,9 @@ class DummyConstantValue extends ConstantValue {
DartType getType(CoreTypes types) => const DynamicType();
- String unparse() => 'dummy($typeMask)';
+ String unparse() => 'dummy($kind, $payload)';
- String toStructuredString() => 'DummyConstant($typeMask)';
+ String toStructuredString() => 'DummyConstant($kind, $payload)';
}
class ConstructedConstantValue extends ObjectConstantValue {

Powered by Google App Engine
This is Rietveld 408576698