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

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

Issue 18090004: Add regression test for r24720. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment. Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/language/regress_r24720_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of ssa; 5 part of ssa;
6 6
7 /** 7 /**
8 * A special element for the extra parameter taken by intercepted 8 * A special element for the extra parameter taken by intercepted
9 * methods. We need to override [Element.computeType] because our 9 * methods. We need to override [Element.computeType] because our
10 * optimizers may look at its declared type. 10 * optimizers may look at its declared type.
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 "Parameters and arguments didn't match for super/redirect call", 1340 "Parameters and arguments didn't match for super/redirect call",
1341 element: constructor); 1341 element: constructor);
1342 } 1342 }
1343 1343
1344 ClassElement superclass = constructor.getEnclosingClass(); 1344 ClassElement superclass = constructor.getEnclosingClass();
1345 if (backend.classNeedsRti(superclass)) { 1345 if (backend.classNeedsRti(superclass)) {
1346 // If [superclass] needs RTI, we have to give a value to its 1346 // If [superclass] needs RTI, we have to give a value to its
1347 // type parameters. Those values are in the [supertype] 1347 // type parameters. Those values are in the [supertype]
1348 // declaration of [subclass]. 1348 // declaration of [subclass].
1349 ClassElement subclass = inlinedFromElement.getEnclosingClass(); 1349 ClassElement subclass = inlinedFromElement.getEnclosingClass();
1350 // If [inlinedFromElement] is a generative constructor then [superclass]
1351 // is a superclass of [subclass]. If [inlinedFromElement] is a
1352 // redirecting constructor then [superclass] is the same as [subclass].
1353 // Using [DartType.asInstanceOf] handles both these cases.
1350 InterfaceType supertype = subclass.thisType.asInstanceOf(superclass); 1354 InterfaceType supertype = subclass.thisType.asInstanceOf(superclass);
1351 Link<DartType> typeVariables = superclass.typeVariables; 1355 Link<DartType> typeVariables = superclass.typeVariables;
1352 supertype.typeArguments.forEach((DartType argument) { 1356 supertype.typeArguments.forEach((DartType argument) {
1353 localsHandler.updateLocal(typeVariables.head.element, 1357 localsHandler.updateLocal(typeVariables.head.element,
1354 analyzeTypeArgument(argument, callNode)); 1358 analyzeTypeArgument(argument, callNode));
1355 typeVariables = typeVariables.tail; 1359 typeVariables = typeVariables.tail;
1356 }); 1360 });
1357 // If the supertype is a raw type, we need to set to null the 1361 // If the supertype is a raw type, we need to set to null the
1358 // type variables. 1362 // type variables.
1359 assert(typeVariables.isEmpty 1363 assert(typeVariables.isEmpty
(...skipping 4077 matching lines...) Expand 10 before | Expand all | Expand 10 after
5437 new HSubGraphBlockInformation(elseBranch.graph)); 5441 new HSubGraphBlockInformation(elseBranch.graph));
5438 5442
5439 HBasicBlock conditionStartBlock = conditionBranch.block; 5443 HBasicBlock conditionStartBlock = conditionBranch.block;
5440 conditionStartBlock.setBlockFlow(info, joinBlock); 5444 conditionStartBlock.setBlockFlow(info, joinBlock);
5441 SubGraph conditionGraph = conditionBranch.graph; 5445 SubGraph conditionGraph = conditionBranch.graph;
5442 HIf branch = conditionGraph.end.last; 5446 HIf branch = conditionGraph.end.last;
5443 assert(branch is HIf); 5447 assert(branch is HIf);
5444 branch.blockInformation = conditionStartBlock.blockFlow; 5448 branch.blockInformation = conditionStartBlock.blockFlow;
5445 } 5449 }
5446 } 5450 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/regress_r24720_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698