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

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: Address comment and update status files. 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 2697 matching lines...) Expand 10 before | Expand all | Expand 10 after
2708 if (element.isSetter()) { 2708 if (element.isSetter()) {
2709 pushInvokeStatic(location, element, <HInstruction>[value]); 2709 pushInvokeStatic(location, element, <HInstruction>[value]);
2710 pop(); 2710 pop();
2711 } else { 2711 } else {
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 List<HInstruction> arguments =
2719 send == null ? const <HInstruction>[] : <HInstruction>[value];
2718 // An erroneous element indicates an unresolved static setter. 2720 // An erroneous element indicates an unresolved static setter.
2719 generateThrowNoSuchMethod( 2721 generateThrowNoSuchMethod(location, getTargetName(element, 'set'),
2720 location, 2722 argumentValues: arguments);
2721 getTargetName(element, 'set'),
2722 argumentNodes: (send == null ? const Link<Node>() : send.arguments));
2723 } else { 2723 } else {
2724 stack.add(value); 2724 stack.add(value);
2725 // If the value does not already have a name, give it here. 2725 // If the value does not already have a name, give it here.
2726 if (value.sourceElement == null) { 2726 if (value.sourceElement == null) {
2727 value.sourceElement = element; 2727 value.sourceElement = element;
2728 } 2728 }
2729 HInstruction checked = 2729 HInstruction checked =
2730 potentiallyCheckType(value, element.computeType(compiler)); 2730 potentiallyCheckType(value, element.computeType(compiler));
2731 if (!identical(checked, value)) { 2731 if (!identical(checked, value)) {
2732 pop(); 2732 pop();
(...skipping 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after
5555 new HSubGraphBlockInformation(elseBranch.graph)); 5555 new HSubGraphBlockInformation(elseBranch.graph));
5556 5556
5557 HBasicBlock conditionStartBlock = conditionBranch.block; 5557 HBasicBlock conditionStartBlock = conditionBranch.block;
5558 conditionStartBlock.setBlockFlow(info, joinBlock); 5558 conditionStartBlock.setBlockFlow(info, joinBlock);
5559 SubGraph conditionGraph = conditionBranch.graph; 5559 SubGraph conditionGraph = conditionBranch.graph;
5560 HIf branch = conditionGraph.end.last; 5560 HIf branch = conditionGraph.end.last;
5561 assert(branch is HIf); 5561 assert(branch is HIf);
5562 branch.blockInformation = conditionStartBlock.blockFlow; 5562 branch.blockInformation = conditionStartBlock.blockFlow;
5563 } 5563 }
5564 } 5564 }
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