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

Unified Diff: pkg/compiler/lib/src/js_backend/type_variable_handler.dart

Issue 1050133006: Add structural equality to ConstantExpression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 5 years, 8 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/js_backend/type_variable_handler.dart
diff --git a/pkg/compiler/lib/src/js_backend/type_variable_handler.dart b/pkg/compiler/lib/src/js_backend/type_variable_handler.dart
index 0658a5a01473417f130763a02e920743bdc57fae..2f7fa2903dcb21f230fd21050a8fe859354d23cc 100644
--- a/pkg/compiler/lib/src/js_backend/type_variable_handler.dart
+++ b/pkg/compiler/lib/src/js_backend/type_variable_handler.dart
@@ -79,12 +79,14 @@ class TypeVariableHandler {
constant);
}
- ConstantExpression name = new PrimitiveConstantExpression(
+ ConstantExpression name = new StringConstantExpression(
+ currentTypeVariable.name,
_backend.constantSystem.createString(
new DartString.literal(currentTypeVariable.name)));
- ConstantExpression bound = new PrimitiveConstantExpression(
- _backend.constantSystem.createInt(
- _metadataCollector.reifyType(typeVariableElement.bound)));
+ int boundIndex = _metadataCollector.reifyType(typeVariableElement.bound);
+ ConstantExpression bound = new IntConstantExpression(
+ boundIndex,
+ _backend.constantSystem.createInt(boundIndex));
ConstantExpression type = _backend.constants.createTypeConstant(cls);
List<AstConstant> arguments =
[wrapConstant(type), wrapConstant(name), wrapConstant(bound)];
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/unsugar.dart ('k') | pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698