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

Unified Diff: lib/compiler/implementation/ssa/codegen_helpers.dart

Issue 10757009: Revert "Allow === and == to generate inputs at the use site when compiling to a single comparison." (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/compiler/implementation/ssa/codegen.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/codegen_helpers.dart
diff --git a/lib/compiler/implementation/ssa/codegen_helpers.dart b/lib/compiler/implementation/ssa/codegen_helpers.dart
index 0659f46db9ef31cee7fc2aeb8853d25326a1a1a2..4344721da0b14d7f8ad8f767a296dbf9ed10fc3e 100644
--- a/lib/compiler/implementation/ssa/codegen_helpers.dart
+++ b/lib/compiler/implementation/ssa/codegen_helpers.dart
@@ -52,26 +52,16 @@ class SsaInstructionMerger extends HBaseVisitor {
// they would not be alive.
void visitTypeGuard(HTypeGuard instruction) {}
- // If an equality operation is builtin it must only have its inputs generated
- // at use site if it does not require an expression with repeated uses
- // (because of null / undefined).
+ // If an equality operation is builtin it must not have its input generated at
+ // use site, because it's using it multiple times (because of null/undefined).
void visitEquals(HEquals instruction) {
if (!instruction.builtin) super.visitEquals(instruction);
- if (singleIdentityComparison(instruction.left, instruction.right) != null) {
- super.visitEquals(instruction);
- }
- // Do nothing.
+ // Otherwise do nothing.
}
- // An identity operation must only have its inputs generated at use site if
- // does not require an expression with multiple uses (because of null /
- // undefined).
- void visitIdentity(HIdentity instruction) {
- if (singleIdentityComparison(instruction.left, instruction.right) != null) {
- super.visitIdentity(instruction);
- }
- // Do nothing.
- }
+ // Identity operations must not have its input generated at use site, because
+ // it's using it multiple times (because of null/undefined).
+ void visitIdentity(HIdentity instruction) {}
void visitTypeConversion(HTypeConversion instruction) {
if (!instruction.isChecked) {
« no previous file with comments | « lib/compiler/implementation/ssa/codegen.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698