| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 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 5444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5455 locs->set_out(0, Location::RequiresRegister()); | 5455 locs->set_out(0, Location::RequiresRegister()); |
| 5456 return locs; | 5456 return locs; |
| 5457 } | 5457 } |
| 5458 | 5458 |
| 5459 | 5459 |
| 5460 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, | 5460 Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
| 5461 BranchLabels labels) { | 5461 BranchLabels labels) { |
| 5462 Location left = locs()->in(0); | 5462 Location left = locs()->in(0); |
| 5463 Location right = locs()->in(1); | 5463 Location right = locs()->in(1); |
| 5464 ASSERT(!left.IsConstant() || !right.IsConstant()); | 5464 ASSERT(!left.IsConstant() || !right.IsConstant()); |
| 5465 Condition true_condition; |
| 5465 if (left.IsConstant()) { | 5466 if (left.IsConstant()) { |
| 5466 compiler->EmitEqualityRegConstCompare(right.reg(), | 5467 true_condition = compiler->EmitEqualityRegConstCompare(right.reg(), |
| 5467 left.constant(), | 5468 left.constant(), |
| 5468 needs_number_check(), | 5469 needs_number_check(), |
| 5469 token_pos()); | 5470 token_pos()); |
| 5470 } else if (right.IsConstant()) { | 5471 } else if (right.IsConstant()) { |
| 5471 compiler->EmitEqualityRegConstCompare(left.reg(), | 5472 true_condition = compiler->EmitEqualityRegConstCompare(left.reg(), |
| 5472 right.constant(), | 5473 right.constant(), |
| 5473 needs_number_check(), | 5474 needs_number_check(), |
| 5474 token_pos()); | 5475 token_pos()); |
| 5475 } else { | 5476 } else { |
| 5476 compiler->EmitEqualityRegRegCompare(left.reg(), | 5477 true_condition = compiler->EmitEqualityRegRegCompare(left.reg(), |
| 5477 right.reg(), | 5478 right.reg(), |
| 5478 needs_number_check(), | 5479 needs_number_check(), |
| 5479 token_pos()); | 5480 token_pos()); |
| 5480 } | 5481 } |
| 5481 Condition true_condition = (kind() == Token::kEQ_STRICT) ? EQ : NE; | 5482 if (kind() != Token::kEQ_STRICT) { |
| 5483 ASSERT(kind() == Token::kNE_STRICT); |
| 5484 true_condition = NegateCondition(true_condition); |
| 5485 } |
| 5482 return true_condition; | 5486 return true_condition; |
| 5483 } | 5487 } |
| 5484 | 5488 |
| 5485 | 5489 |
| 5486 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5490 void StrictCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 5487 __ TraceSimMsg("StrictCompareInstr"); | 5491 __ TraceSimMsg("StrictCompareInstr"); |
| 5488 __ Comment("StrictCompareInstr"); | 5492 __ Comment("StrictCompareInstr"); |
| 5489 ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); | 5493 ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); |
| 5490 | 5494 |
| 5491 Label is_true, is_false; | 5495 Label is_true, is_false; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5565 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 5569 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
| 5566 #if defined(DEBUG) | 5570 #if defined(DEBUG) |
| 5567 __ LoadImmediate(S4, kInvalidObjectPointer); | 5571 __ LoadImmediate(S4, kInvalidObjectPointer); |
| 5568 __ LoadImmediate(S5, kInvalidObjectPointer); | 5572 __ LoadImmediate(S5, kInvalidObjectPointer); |
| 5569 #endif | 5573 #endif |
| 5570 } | 5574 } |
| 5571 | 5575 |
| 5572 } // namespace dart | 5576 } // namespace dart |
| 5573 | 5577 |
| 5574 #endif // defined TARGET_ARCH_MIPS | 5578 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |