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

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

Issue 15917017: Don't let HCheck instructions prevent GVN. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 | sdk/lib/_internal/compiler/implementation/ssa/nodes.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 SsaCodeGeneratorTask extends CompilerTask { 7 class SsaCodeGeneratorTask extends CompilerTask {
8 8
9 final JavaScriptBackend backend; 9 final JavaScriptBackend backend;
10 10
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 } 613 }
614 } 614 }
615 615
616 void use(HInstruction argument) { 616 void use(HInstruction argument) {
617 if (isGenerateAtUseSite(argument)) { 617 if (isGenerateAtUseSite(argument)) {
618 visitExpression(argument); 618 visitExpression(argument);
619 } else if (argument is HCheck && !variableNames.hasName(argument)) { 619 } else if (argument is HCheck && !variableNames.hasName(argument)) {
620 HCheck check = argument; 620 HCheck check = argument;
621 use(check.checkedInput); 621 use(check.checkedInput);
622 } else { 622 } else {
623 assert(variableNames.hasName(argument));
623 push(new js.VariableUse(variableNames.getName(argument))); 624 push(new js.VariableUse(variableNames.getName(argument)));
624 } 625 }
625 } 626 }
626 627
627 visit(HInstruction node) { 628 visit(HInstruction node) {
628 node.accept(this); 629 node.accept(this);
629 } 630 }
630 631
631 visitExpression(HInstruction node) { 632 visitExpression(HInstruction node) {
632 bool oldIsGeneratingExpression = isGeneratingExpression; 633 bool oldIsGeneratingExpression = isGeneratingExpression;
(...skipping 2379 matching lines...) Expand 10 before | Expand all | Expand 10 after
3012 if (leftType.canBeNull() && rightType.canBeNull()) { 3013 if (leftType.canBeNull() && rightType.canBeNull()) {
3013 if (left.isConstantNull() || right.isConstantNull() || 3014 if (left.isConstantNull() || right.isConstantNull() ||
3014 (leftType.isPrimitive() && leftType == rightType)) { 3015 (leftType.isPrimitive() && leftType == rightType)) {
3015 return '=='; 3016 return '==';
3016 } 3017 }
3017 return null; 3018 return null;
3018 } else { 3019 } else {
3019 return '==='; 3020 return '===';
3020 } 3021 }
3021 } 3022 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698