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

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

Issue 11275122: Merge revision r14430 to trunk. Do not evaluate arguments of an instance send if that instance sen… (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 1 month 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 | dart/tests/language/inline_argument_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 class Interceptors { 7 class Interceptors {
8 Compiler compiler; 8 Compiler compiler;
9 Interceptors(Compiler this.compiler); 9 Interceptors(Compiler this.compiler);
10 10
(...skipping 2540 matching lines...) Expand 10 before | Expand all | Expand 10 after
2551 HStatic target = new HStatic(interceptor); 2551 HStatic target = new HStatic(interceptor);
2552 add(target); 2552 add(target);
2553 inputs.add(target); 2553 inputs.add(target);
2554 visit(node.receiver); 2554 visit(node.receiver);
2555 inputs.add(pop()); 2555 inputs.add(pop());
2556 addGenericSendArgumentsToList(node.arguments, inputs); 2556 addGenericSendArgumentsToList(node.arguments, inputs);
2557 pushWithPosition(new HInvokeInterceptor(selector, inputs), node); 2557 pushWithPosition(new HInvokeInterceptor(selector, inputs), node);
2558 return; 2558 return;
2559 } 2559 }
2560 2560
2561 Element element = elements[node];
2562 if (element != null && compiler.world.hasNoOverridingMember(element)) {
2563 if (tryInlineMethod(element, selector, node.arguments)) {
2564 return;
2565 }
2566 }
2567
2561 if (node.receiver == null) { 2568 if (node.receiver == null) {
2562 inputs.add(localsHandler.readThis()); 2569 inputs.add(localsHandler.readThis());
2563 } else { 2570 } else {
2564 visit(node.receiver); 2571 visit(node.receiver);
2565 inputs.add(pop()); 2572 inputs.add(pop());
2566 } 2573 }
2567 2574
2568 addDynamicSendArgumentsToList(node, inputs); 2575 addDynamicSendArgumentsToList(node, inputs);
2569
2570 Element element = elements[node];
2571 if (element != null && compiler.world.hasNoOverridingMember(element)) {
2572 if (tryInlineMethod(element, selector, node.arguments)) {
2573 return;
2574 }
2575 }
2576 // The first entry in the inputs list is the receiver. 2576 // The first entry in the inputs list is the receiver.
2577 pushWithPosition(new HInvokeDynamicMethod(selector, inputs), node); 2577 pushWithPosition(new HInvokeDynamicMethod(selector, inputs), node);
2578 2578
2579 if (isNotEquals) { 2579 if (isNotEquals) {
2580 HNot not = new HNot(popBoolified()); 2580 HNot not = new HNot(popBoolified());
2581 push(not); 2581 push(not);
2582 } 2582 }
2583 } 2583 }
2584 2584
2585 visitClosureSend(Send node) { 2585 visitClosureSend(Send node) {
(...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after
4609 new HSubGraphBlockInformation(elseBranch.graph)); 4609 new HSubGraphBlockInformation(elseBranch.graph));
4610 4610
4611 HBasicBlock conditionStartBlock = conditionBranch.block; 4611 HBasicBlock conditionStartBlock = conditionBranch.block;
4612 conditionStartBlock.setBlockFlow(info, joinBlock); 4612 conditionStartBlock.setBlockFlow(info, joinBlock);
4613 SubGraph conditionGraph = conditionBranch.graph; 4613 SubGraph conditionGraph = conditionBranch.graph;
4614 HIf branch = conditionGraph.end.last; 4614 HIf branch = conditionGraph.end.last;
4615 assert(branch is HIf); 4615 assert(branch is HIf);
4616 branch.blockInformation = conditionStartBlock.blockFlow; 4616 branch.blockInformation = conditionStartBlock.blockFlow;
4617 } 4617 }
4618 } 4618 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/language/inline_argument_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698