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

Unified Diff: lib/compiler/implementation/runtime_types.dart

Issue 10942028: Support class and typedef literals as expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address Peter's comments. Created 8 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
Index: lib/compiler/implementation/runtime_types.dart
diff --git a/lib/compiler/implementation/runtime_types.dart b/lib/compiler/implementation/runtime_types.dart
index 9b0820f10ea82b141eba018c74a2c9781f94097b..c583cb13ed4d55d32a94f737c04792f3274c7282 100644
--- a/lib/compiler/implementation/runtime_types.dart
+++ b/lib/compiler/implementation/runtime_types.dart
@@ -11,6 +11,10 @@ import 'universe/universe.dart';
import 'util/util.dart';
class RuntimeTypeInformation {
+
+ static final SourceString CACHE_HELPER_NAME =
+ const SourceString('getOrCreateCachedRuntimeType');
ahe 2012/11/05 09:47:05 How about moving this to compiler.dart?
+
/**
* Names used for elements in runtime type information. This map is kept to
* detect elements with the same name and use a different name instead.
@@ -64,17 +68,17 @@ class RuntimeTypeInformation {
/**
* Generate a string representation template for this element, using '#' to
* denote the place for the type argument input. If there are more type
- * variables than [numberOfInputs], 'Dynamic' is used as the value for these
+ * variables than [numberOfInputs], 'dynamic' is used as the value for these
* arguments.
*/
String generateRuntimeTypeString(ClassElement element, int numberOfInputs) {
String elementName = getName(element);
- if (element.typeVariables.isEmpty) return "'$elementName'";
- String stringify(_, bool hasValue) => hasValue ? "' + # + '" : "Dynamic";
+ if (element.typeVariables.isEmpty) return "$elementName";
+ String stringify(_, bool hasValue) => hasValue ? "' + # + '" : "dynamic";
String arguments = stringifyTypeVariables(element.typeVariables,
numberOfInputs,
stringify);
- return "'$elementName<$arguments>'";
+ return "$elementName<$arguments>";
}
/**

Powered by Google App Engine
This is Rietveld 408576698