| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 5483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5494 locs->set_out(0, Location::RequiresRegister()); | 5494 locs->set_out(0, Location::RequiresRegister()); |
| 5495 return locs; | 5495 return locs; |
| 5496 } | 5496 } |
| 5497 | 5497 |
| 5498 | 5498 |
| 5499 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, | 5499 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
| 5500 BranchLabels labels) { | 5500 BranchLabels labels) { |
| 5501 Location left = locs()->in(0); | 5501 Location left = locs()->in(0); |
| 5502 Location right = locs()->in(1); | 5502 Location right = locs()->in(1); |
| 5503 ASSERT(!left.IsConstant() || !right.IsConstant()); | 5503 ASSERT(!left.IsConstant() || !right.IsConstant()); |
| 5504 Condition true_condition; |
| 5504 if (left.IsConstant()) { | 5505 if (left.IsConstant()) { |
| 5505 compiler->EmitEqualityRegConstCompare(right.reg(), | 5506 true_condition = compiler->EmitEqualityRegConstCompare(right.reg(), |
| 5506 left.constant(), | 5507 left.constant(), |
| 5507 needs_number_check(), | 5508 needs_number_check(), |
| 5508 token_pos()); | 5509 token_pos()); |
| 5509 } else if (right.IsConstant()) { | 5510 } else if (right.IsConstant()) { |
| 5510 compiler->EmitEqualityRegConstCompare(left.reg(), | 5511 true_condition = compiler->EmitEqualityRegConstCompare(left.reg(), |
| 5511 right.constant(), | 5512 right.constant(), |
| 5512 needs_number_check(), | 5513 needs_number_check(), |
| 5513 token_pos()); | 5514 token_pos()); |
| 5514 } else { | 5515 } else { |
| 5515 compiler->EmitEqualityRegRegCompare(left.reg(), | 5516 true_condition = compiler->EmitEqualityRegRegCompare(left.reg(), |
| 5516 right.reg(), | 5517 right.reg(), |
| 5517 needs_number_check(), | 5518 needs_number_check(), |
| 5518 token_pos()); | 5519 token_pos()); |
| 5519 } | 5520 } |
| 5520 Condition true_condition = (kind() == Token::kEQ_STRICT) ? EQ : NE; | 5521 if (kind() != Token::kEQ_STRICT) { |
| 5522 ASSERT(kind() == Token::kNE_STRICT); |
| 5523 true_condition = NegateCondition(true_condition); |
| 5524 } |
| 5521 return true_condition; | 5525 return true_condition; |
| 5522 } | 5526 } |
| 5523 | 5527 |
| 5524 | 5528 |
| 5525 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5529 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 5526 __ Comment("StrictCompareInstr"); | 5530 __ Comment("StrictCompareInstr"); |
| 5527 ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); | 5531 ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); |
| 5528 | 5532 |
| 5529 Label is_true, is_false; | 5533 Label is_true, is_false; |
| 5530 BranchLabels labels = { &is_true, &is_false, &is_false }; | 5534 BranchLabels labels = { &is_true, &is_false, &is_false }; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5600 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 5604 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
| 5601 #if defined(DEBUG) | 5605 #if defined(DEBUG) |
| 5602 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); | 5606 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); |
| 5603 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); | 5607 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); |
| 5604 #endif | 5608 #endif |
| 5605 } | 5609 } |
| 5606 | 5610 |
| 5607 } // namespace dart | 5611 } // namespace dart |
| 5608 | 5612 |
| 5609 #endif // defined TARGET_ARCH_ARM64 | 5613 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |