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

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

Issue 1126423002: Avoid reparsing metadata expressions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/metadata_collector.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6344a1d99349b81c553e2bb1cbbefb22ca6a7395..a9e7c83462de15732fcc1058f615af830aeaa970 100644
--- a/pkg/compiler/lib/src/js_backend/type_variable_handler.dart
+++ b/pkg/compiler/lib/src/js_backend/type_variable_handler.dart
@@ -124,8 +124,7 @@ class TypeVariableHandler {
* there, otherwise a new entry for [c] is created.
*/
int _reifyTypeVariableConstant(ConstantValue c, TypeVariableElement variable) {
- String name = jsAst.prettyPrint(_task.constantReference(c),
- _compiler).getText();
+ jsAst.Expression name = _task.constantReference(c);
int index;
if (_typeVariableConstants.containsKey(variable)) {
index = _typeVariableConstants[variable];
@@ -153,7 +152,7 @@ class TypeVariableHandler {
}
// TODO(15613): Remove quotes.
- _metadataCollector.globalMetadata.add('"Placeholder for ${variable}"');
+ _metadataCollector.globalMetadata.add(js('"Placeholder for ${variable}"'));
return _typeVariableConstants[variable] =
_metadataCollector.globalMetadata.length - 1;
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/metadata_collector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698