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

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

Issue 10310076: Fix typo when generating a not boolified input. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 | « frog/tests/leg/boolify_test.dart ('k') | no next file » | 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 class SsaCodeGeneratorTask extends CompilerTask { 5 class SsaCodeGeneratorTask extends CompilerTask {
6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); 6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler);
7 String get name() => 'SSA code generator'; 7 String get name() => 'SSA code generator';
8 8
9 9
10 String buildJavaScriptFunction(FunctionElement element, 10 String buildJavaScriptFunction(FunctionElement element,
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 } 1673 }
1674 } 1674 }
1675 } 1675 }
1676 1676
1677 visitNot(HNot node) { 1677 visitNot(HNot node) {
1678 assert(node.inputs.length == 1); 1678 assert(node.inputs.length == 1);
1679 HInstruction input = node.inputs[0]; 1679 HInstruction input = node.inputs[0];
1680 if (input is HBoolify && isGenerateAtUseSite(input)) { 1680 if (input is HBoolify && isGenerateAtUseSite(input)) {
1681 beginExpression(JSPrecedence.EQUALITY_PRECEDENCE); 1681 beginExpression(JSPrecedence.EQUALITY_PRECEDENCE);
1682 assert(node.inputs.length == 1); 1682 assert(node.inputs.length == 1);
1683 use(node.inputs[0], JSPrecedence.EQUALITY_PRECEDENCE); 1683 use(input.inputs[0], JSPrecedence.EQUALITY_PRECEDENCE);
1684 buffer.add(' !== true'); 1684 buffer.add(' !== true');
1685 endExpression(JSPrecedence.EQUALITY_PRECEDENCE); 1685 endExpression(JSPrecedence.EQUALITY_PRECEDENCE);
1686 } else if (input is HRelational && 1686 } else if (input is HRelational &&
1687 input.builtin && 1687 input.builtin &&
1688 isGenerateAtUseSite(input)) { 1688 isGenerateAtUseSite(input)) {
1689 Map<String, String> inverseOperator = const <String>{ 1689 Map<String, String> inverseOperator = const <String>{
1690 "==" : "!=", 1690 "==" : "!=",
1691 "!=" : "==", 1691 "!=" : "==",
1692 "===": "!==", 1692 "===": "!==",
1693 "!==": "===", 1693 "!==": "===",
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
2593 startBailoutSwitch(); 2593 startBailoutSwitch();
2594 } 2594 }
2595 } 2595 }
2596 2596
2597 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { 2597 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) {
2598 if (labeledBlockInfo.body.start.hasGuards()) { 2598 if (labeledBlockInfo.body.start.hasGuards()) {
2599 endBailoutSwitch(); 2599 endBailoutSwitch();
2600 } 2600 }
2601 } 2601 }
2602 } 2602 }
OLDNEW
« no previous file with comments | « frog/tests/leg/boolify_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698