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

Unified Diff: lib/compiler/implementation/ssa/builder.dart

Issue 11086074: Give different runtime type representations to different types with the same name. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 2 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: lib/compiler/implementation/ssa/builder.dart
diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
index d9995d5249d86d2a650a7b81f3f2dea15f9f8523..2f88ce813e336c78d80cadba7b702cb5d4c78b3d 100644
--- a/lib/compiler/implementation/ssa/builder.dart
+++ b/lib/compiler/implementation/ssa/builder.dart
@@ -853,6 +853,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
LocalsHandler localsHandler;
HInstruction rethrowableException;
Map<Element, HParameterValue> parameters;
+ final RuntimeTypeInformation rti;
Map<TargetElement, JumpHandler> jumpTargets;
@@ -894,6 +895,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
parameters = new Map<Element, HParameterValue>(),
sourceElementStack = <Element>[work.element],
inliningStack = <InliningState>[],
+ rti = builder.compiler.codegenWorld.rti,
super(work.resolutionTree) {
localsHandler = new LocalsHandler(this);
}
@@ -2792,7 +2794,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
InterfaceType interfaceType = type;
bool hasTypeArguments = !interfaceType.arguments.isEmpty();
if (!isInQuotes) template.add("'");
- template.add("${type.element.name.slowToString()}");
+ template.add(rti.getName(type.element));
if (hasTypeArguments) {
template.add("<");
for (DartType argument in interfaceType.arguments) {
@@ -2809,7 +2811,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
} else {
assert(type is TypedefType);
if (!isInQuotes) template.add("'");
- template.add(argument.toString());
+ template.add(rti.getName(argument.element));
if (!isInQuotes) template.add("'");
}
}
@@ -2854,8 +2856,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
List<HInstruction> runtimeCodeInputs = <HInstruction>[];
if (runtimeTypeIsUsed) {
String runtimeTypeString =
- RuntimeTypeInformation.generateRuntimeTypeString(element,
- rtiInputs.length);
+ rti.generateRuntimeTypeString(element, rtiInputs.length);
HInstruction runtimeType = createForeign(runtimeTypeString, rtiInputs);
add(runtimeType);
runtimeCodeInputs.add(runtimeType);

Powered by Google App Engine
This is Rietveld 408576698