| 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 "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 } | 273 } |
| 274 | 274 |
| 275 | 275 |
| 276 void ArgumentDefinitionTestInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 276 void ArgumentDefinitionTestInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 277 UNIMPLEMENTED(); | 277 UNIMPLEMENTED(); |
| 278 } | 278 } |
| 279 | 279 |
| 280 | 280 |
| 281 LocationSummary* EqualityCompareInstr::MakeLocationSummary() const { | 281 LocationSummary* EqualityCompareInstr::MakeLocationSummary() const { |
| 282 const intptr_t kNumInputs = 2; | 282 const intptr_t kNumInputs = 2; |
| 283 const bool is_checked_strict_equal = | |
| 284 HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid); | |
| 285 if (receiver_class_id() == kMintCid) { | 283 if (receiver_class_id() == kMintCid) { |
| 286 const intptr_t kNumTemps = 1; | 284 const intptr_t kNumTemps = 1; |
| 287 LocationSummary* locs = | 285 LocationSummary* locs = |
| 288 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 286 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 289 locs->set_in(0, Location::RequiresFpuRegister()); | 287 locs->set_in(0, Location::RequiresFpuRegister()); |
| 290 locs->set_in(1, Location::RequiresFpuRegister()); | 288 locs->set_in(1, Location::RequiresFpuRegister()); |
| 291 locs->set_temp(0, Location::RequiresRegister()); | 289 locs->set_temp(0, Location::RequiresRegister()); |
| 292 locs->set_out(Location::RequiresRegister()); | 290 locs->set_out(Location::RequiresRegister()); |
| 293 return locs; | 291 return locs; |
| 294 } | 292 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 307 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 305 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 308 locs->set_in(0, Location::RegisterOrConstant(left())); | 306 locs->set_in(0, Location::RegisterOrConstant(left())); |
| 309 // Only one input can be a constant operand. The case of two constant | 307 // Only one input can be a constant operand. The case of two constant |
| 310 // operands should be handled by constant propagation. | 308 // operands should be handled by constant propagation. |
| 311 locs->set_in(1, locs->in(0).IsConstant() | 309 locs->set_in(1, locs->in(0).IsConstant() |
| 312 ? Location::RequiresRegister() | 310 ? Location::RequiresRegister() |
| 313 : Location::RegisterOrConstant(right())); | 311 : Location::RegisterOrConstant(right())); |
| 314 locs->set_out(Location::RequiresRegister()); | 312 locs->set_out(Location::RequiresRegister()); |
| 315 return locs; | 313 return locs; |
| 316 } | 314 } |
| 317 if (is_checked_strict_equal) { | 315 if (is_checked_strict_equal()) { |
| 318 const intptr_t kNumTemps = 1; | 316 const intptr_t kNumTemps = 1; |
| 319 LocationSummary* locs = | 317 LocationSummary* locs = |
| 320 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 318 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 321 locs->set_in(0, Location::RequiresRegister()); | 319 locs->set_in(0, Location::RequiresRegister()); |
| 322 locs->set_in(1, Location::RequiresRegister()); | 320 locs->set_in(1, Location::RequiresRegister()); |
| 323 locs->set_temp(0, Location::RequiresRegister()); | 321 locs->set_temp(0, Location::RequiresRegister()); |
| 324 locs->set_out(Location::RequiresRegister()); | 322 locs->set_out(Location::RequiresRegister()); |
| 325 return locs; | 323 return locs; |
| 326 } | 324 } |
| 327 if (IsPolymorphic()) { | 325 if (IsPolymorphic()) { |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 return; | 587 return; |
| 590 } | 588 } |
| 591 if (receiver_class_id() == kMintCid) { | 589 if (receiver_class_id() == kMintCid) { |
| 592 EmitUnboxedMintEqualityOp(compiler, *locs(), kind(), kNoBranch); | 590 EmitUnboxedMintEqualityOp(compiler, *locs(), kind(), kNoBranch); |
| 593 return; | 591 return; |
| 594 } | 592 } |
| 595 if (receiver_class_id() == kDoubleCid) { | 593 if (receiver_class_id() == kDoubleCid) { |
| 596 EmitDoubleComparisonOp(compiler, *locs(), kind(), kNoBranch); | 594 EmitDoubleComparisonOp(compiler, *locs(), kind(), kNoBranch); |
| 597 return; | 595 return; |
| 598 } | 596 } |
| 599 const bool is_checked_strict_equal = | 597 if (is_checked_strict_equal()) { |
| 600 HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid); | |
| 601 if (is_checked_strict_equal) { | |
| 602 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), kNoBranch, | 598 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), kNoBranch, |
| 603 deopt_id()); | 599 deopt_id()); |
| 604 return; | 600 return; |
| 605 } | 601 } |
| 606 if (IsPolymorphic()) { | 602 if (IsPolymorphic()) { |
| 607 EmitGenericEqualityCompare(compiler, locs(), kind(), kNoBranch, *ic_data(), | 603 EmitGenericEqualityCompare(compiler, locs(), kind(), kNoBranch, *ic_data(), |
| 608 deopt_id(), token_pos()); | 604 deopt_id(), token_pos()); |
| 609 return; | 605 return; |
| 610 } | 606 } |
| 611 Register left = locs()->in(0).reg(); | 607 Register left = locs()->in(0).reg(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 632 return; | 628 return; |
| 633 } | 629 } |
| 634 if (receiver_class_id() == kMintCid) { | 630 if (receiver_class_id() == kMintCid) { |
| 635 EmitUnboxedMintEqualityOp(compiler, *locs(), kind(), branch); | 631 EmitUnboxedMintEqualityOp(compiler, *locs(), kind(), branch); |
| 636 return; | 632 return; |
| 637 } | 633 } |
| 638 if (receiver_class_id() == kDoubleCid) { | 634 if (receiver_class_id() == kDoubleCid) { |
| 639 EmitDoubleComparisonOp(compiler, *locs(), kind(), branch); | 635 EmitDoubleComparisonOp(compiler, *locs(), kind(), branch); |
| 640 return; | 636 return; |
| 641 } | 637 } |
| 642 const bool is_checked_strict_equal = | 638 if (is_checked_strict_equal()) { |
| 643 HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid); | |
| 644 if (is_checked_strict_equal) { | |
| 645 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), branch, | 639 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), branch, |
| 646 deopt_id()); | 640 deopt_id()); |
| 647 return; | 641 return; |
| 648 } | 642 } |
| 649 if (IsPolymorphic()) { | 643 if (IsPolymorphic()) { |
| 650 EmitGenericEqualityCompare(compiler, locs(), kind(), branch, *ic_data(), | 644 EmitGenericEqualityCompare(compiler, locs(), kind(), branch, *ic_data(), |
| 651 deopt_id(), token_pos()); | 645 deopt_id(), token_pos()); |
| 652 return; | 646 return; |
| 653 } | 647 } |
| 654 Register left = locs()->in(0).reg(); | 648 Register left = locs()->in(0).reg(); |
| (...skipping 2315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2970 compiler->GenerateCall(token_pos(), | 2964 compiler->GenerateCall(token_pos(), |
| 2971 &label, | 2965 &label, |
| 2972 PcDescriptors::kOther, | 2966 PcDescriptors::kOther, |
| 2973 locs()); | 2967 locs()); |
| 2974 __ Drop(2); // Discard type arguments and receiver. | 2968 __ Drop(2); // Discard type arguments and receiver. |
| 2975 } | 2969 } |
| 2976 | 2970 |
| 2977 } // namespace dart | 2971 } // namespace dart |
| 2978 | 2972 |
| 2979 #endif // defined TARGET_ARCH_MIPS | 2973 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |