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

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

Issue 12779005: Read type argument from local in constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add assertion. Created 7 years, 9 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 | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index b86b54257dc4f0f63b378c859cab35bb5d54d7e7..95197e6455a29af55fe454e89a8bfb1f54c22fcf 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -3167,6 +3167,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
*/
HInstruction readTypeVariable(ClassElement cls,
TypeVariableElement variable) {
+ assert(currentElement.isInstanceMember());
int index = RuntimeTypeInformation.getTypeVariableIndex(variable);
String substitutionNameString = backend.namer.substitutionName(cls);
HInstruction substitutionName = graph.addConstantString(
@@ -3429,8 +3430,8 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
Constant constant = handler.compileNodeWithDefinitions(node, elements);
stack.add(graph.addConstant(constant));
} else if (element.isTypeVariable()) {
- HInstruction value = readTypeVariable(currentElement.getEnclosingClass(),
- element);
+ HInstruction value =
+ addTypeVariableReference(element.computeType(compiler));
pushInvokeHelper1(backend.getRuntimeTypeToString(),
value, HType.STRING);
pushInvokeHelper1(backend.getCreateRuntimeType(),
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698