| OLD | NEW |
| 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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 if (left.IsConstant() && right.IsConstant()) { | 579 if (left.IsConstant() && right.IsConstant()) { |
| 580 bool result = false; | 580 bool result = false; |
| 581 // One of them could be NULL (for equality only). | 581 // One of them could be NULL (for equality only). |
| 582 if (left.constant().IsNull() || right.constant().IsNull()) { | 582 if (left.constant().IsNull() || right.constant().IsNull()) { |
| 583 ASSERT((kind == Token::kEQ) || (kind == Token::kNE)); | 583 ASSERT((kind == Token::kEQ) || (kind == Token::kNE)); |
| 584 result = left.constant().IsNull() && right.constant().IsNull(); | 584 result = left.constant().IsNull() && right.constant().IsNull(); |
| 585 if (kind == Token::kNE) { | 585 if (kind == Token::kNE) { |
| 586 result = !result; | 586 result = !result; |
| 587 } | 587 } |
| 588 } else { | 588 } else { |
| 589 // TODO(vegorov): should be eliminated earlier by constant propagation. | 589 // TODO(vegorov): should be eliminated earlier by constant propagation. |
| 590 result = FlowGraphCompiler::EvaluateCondition( | 590 result = FlowGraphCompiler::EvaluateCondition( |
| 591 true_condition, | 591 true_condition, |
| 592 Smi::Cast(left.constant()).Value(), | 592 Smi::Cast(left.constant()).Value(), |
| 593 Smi::Cast(right.constant()).Value()); | 593 Smi::Cast(right.constant()).Value()); |
| 594 } | 594 } |
| 595 | 595 |
| 596 if (branch != NULL) { | 596 if (branch != NULL) { |
| 597 branch->EmitBranchOnValue(compiler, result); | 597 branch->EmitBranchOnValue(compiler, result); |
| 598 } else { | 598 } else { |
| 599 __ LoadObject(locs.out().reg(), result ? compiler->bool_true() | 599 __ LoadObject(locs.out().reg(), result ? compiler->bool_true() |
| (...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2206 | 2206 |
| 2207 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2207 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2208 UNIMPLEMENTED(); | 2208 UNIMPLEMENTED(); |
| 2209 } | 2209 } |
| 2210 | 2210 |
| 2211 } // namespace dart | 2211 } // namespace dart |
| 2212 | 2212 |
| 2213 #undef __ | 2213 #undef __ |
| 2214 | 2214 |
| 2215 #endif // defined TARGET_ARCH_X64 | 2215 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |