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

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

Issue 10693059: remove HIf.hasElse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
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 class Interceptors { 5 class Interceptors {
6 Compiler compiler; 6 Compiler compiler;
7 Interceptors(Compiler this.compiler); 7 Interceptors(Compiler this.compiler);
8 8
9 SourceString mapOperatorToMethodName(Operator op) { 9 SourceString mapOperatorToMethodName(Operator op) {
10 String name = op.source.stringValue; 10 String name = op.source.stringValue;
(...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 () => visit(node.thenPart), 1571 () => visit(node.thenPart),
1572 node.elsePart != null ? () => visit(node.elsePart) : null); 1572 node.elsePart != null ? () => visit(node.elsePart) : null);
1573 } 1573 }
1574 1574
1575 void handleIf(void visitCondition(), void visitThen(), void visitElse()) { 1575 void handleIf(void visitCondition(), void visitThen(), void visitElse()) {
1576 HBasicBlock conditionStartBlock = openNewBlock(); 1576 HBasicBlock conditionStartBlock = openNewBlock();
1577 visitCondition(); 1577 visitCondition();
1578 SubExpression conditionGraph = 1578 SubExpression conditionGraph =
1579 new SubExpression(conditionStartBlock, lastOpenedBlock); 1579 new SubExpression(conditionStartBlock, lastOpenedBlock);
1580 HInstruction condition = popBoolified(); 1580 HInstruction condition = popBoolified();
1581 HIf branch = new HIf(condition, true); 1581 HIf branch = new HIf(condition);
1582 HBasicBlock conditionBlock = close(branch); 1582 HBasicBlock conditionBlock = close(branch);
1583 1583
1584 LocalsHandler savedLocals = new LocalsHandler.from(localsHandler); 1584 LocalsHandler savedLocals = new LocalsHandler.from(localsHandler);
1585 1585
1586 // The then part. 1586 // The then part.
1587 HBasicBlock thenBlock = addNewBlock(); 1587 HBasicBlock thenBlock = addNewBlock();
1588 conditionBlock.addSuccessor(thenBlock); 1588 conditionBlock.addSuccessor(thenBlock);
1589 open(thenBlock); 1589 open(thenBlock);
1590 visitThen(); 1590 visitThen();
1591 SubGraph thenGraph = new SubGraph(thenBlock, lastOpenedBlock); 1591 SubGraph thenGraph = new SubGraph(thenBlock, lastOpenedBlock);
(...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after
3478 void visitNodeList(NodeList node) { 3478 void visitNodeList(NodeList node) {
3479 node.visitChildren(this); 3479 node.visitChildren(this);
3480 } 3480 }
3481 3481
3482 HInstruction concat(HInstruction left, HInstruction right) { 3482 HInstruction concat(HInstruction left, HInstruction right) {
3483 HInstruction instruction = new HStringConcat(left, right, diagnosticNode); 3483 HInstruction instruction = new HStringConcat(left, right, diagnosticNode);
3484 builder.add(instruction); 3484 builder.add(instruction);
3485 return instruction; 3485 return instruction;
3486 } 3486 }
3487 } 3487 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/bailout.dart ('k') | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698