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

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

Issue 25877002: Don't evaluate the argument twice for unresolved static setter calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Change status for VM and dart2dart. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/co19/co19-co19.status » ('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 2701 matching lines...) Expand 10 before | Expand all | Expand 10 after
2712 value = 2712 value =
2713 potentiallyCheckType(value, element.computeType(compiler)); 2713 potentiallyCheckType(value, element.computeType(compiler));
2714 addWithPosition(new HStaticStore(element, value), location); 2714 addWithPosition(new HStaticStore(element, value), location);
2715 } 2715 }
2716 stack.add(value); 2716 stack.add(value);
2717 } else if (Elements.isErroneousElement(element)) { 2717 } else if (Elements.isErroneousElement(element)) {
2718 // An erroneous element indicates an unresolved static setter. 2718 // An erroneous element indicates an unresolved static setter.
2719 generateThrowNoSuchMethod( 2719 generateThrowNoSuchMethod(
2720 location, 2720 location,
2721 getTargetName(element, 'set'), 2721 getTargetName(element, 'set'),
2722 argumentNodes: (send == null ? const Link<Node>() : send.arguments)); 2722 argumentValues: (send == null ? <HInstruction>[] :
kasperl 2013/10/04 07:30:27 I'd compute the argument values outside the call t
karlklose 2013/10/04 08:46:55 Done.
2723 <HInstruction>[value]));
2723 } else { 2724 } else {
2724 stack.add(value); 2725 stack.add(value);
2725 // If the value does not already have a name, give it here. 2726 // If the value does not already have a name, give it here.
2726 if (value.sourceElement == null) { 2727 if (value.sourceElement == null) {
2727 value.sourceElement = element; 2728 value.sourceElement = element;
2728 } 2729 }
2729 HInstruction checked = 2730 HInstruction checked =
2730 potentiallyCheckType(value, element.computeType(compiler)); 2731 potentiallyCheckType(value, element.computeType(compiler));
2731 if (!identical(checked, value)) { 2732 if (!identical(checked, value)) {
2732 pop(); 2733 pop();
(...skipping 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after
5555 new HSubGraphBlockInformation(elseBranch.graph)); 5556 new HSubGraphBlockInformation(elseBranch.graph));
5556 5557
5557 HBasicBlock conditionStartBlock = conditionBranch.block; 5558 HBasicBlock conditionStartBlock = conditionBranch.block;
5558 conditionStartBlock.setBlockFlow(info, joinBlock); 5559 conditionStartBlock.setBlockFlow(info, joinBlock);
5559 SubGraph conditionGraph = conditionBranch.graph; 5560 SubGraph conditionGraph = conditionBranch.graph;
5560 HIf branch = conditionGraph.end.last; 5561 HIf branch = conditionGraph.end.last;
5561 assert(branch is HIf); 5562 assert(branch is HIf);
5562 branch.blockInformation = conditionStartBlock.blockFlow; 5563 branch.blockInformation = conditionStartBlock.blockFlow;
5563 } 5564 }
5564 } 5565 }
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-co19.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698