| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 if (is_checked_strict_equal) { | 303 if (is_checked_strict_equal) { |
| 304 const intptr_t kNumTemps = 1; | 304 const intptr_t kNumTemps = 1; |
| 305 LocationSummary* locs = | 305 LocationSummary* locs = |
| 306 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 306 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 307 locs->set_in(0, Location::RequiresRegister()); | 307 locs->set_in(0, Location::RequiresRegister()); |
| 308 locs->set_in(1, Location::RequiresRegister()); | 308 locs->set_in(1, Location::RequiresRegister()); |
| 309 locs->set_temp(0, Location::RequiresRegister()); | 309 locs->set_temp(0, Location::RequiresRegister()); |
| 310 locs->set_out(Location::RequiresRegister()); | 310 locs->set_out(Location::RequiresRegister()); |
| 311 return locs; | 311 return locs; |
| 312 } | 312 } |
| 313 if (HasICData() && (ic_data()->NumberOfChecks() > 0)) { | 313 if (IsPolymorphic()) { |
| 314 const intptr_t kNumTemps = 1; | 314 const intptr_t kNumTemps = 1; |
| 315 LocationSummary* locs = | 315 LocationSummary* locs = |
| 316 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 316 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
| 317 locs->set_in(0, Location::RegisterLocation(ECX)); | 317 locs->set_in(0, Location::RegisterLocation(ECX)); |
| 318 locs->set_in(1, Location::RegisterLocation(EDX)); | 318 locs->set_in(1, Location::RegisterLocation(EDX)); |
| 319 locs->set_temp(0, Location::RegisterLocation(EBX)); | 319 locs->set_temp(0, Location::RegisterLocation(EBX)); |
| 320 locs->set_out(Location::RegisterLocation(EAX)); | 320 locs->set_out(Location::RegisterLocation(EAX)); |
| 321 return locs; | 321 return locs; |
| 322 } | 322 } |
| 323 const intptr_t kNumTemps = 1; | 323 const intptr_t kNumTemps = 1; |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 EmitDoubleComparisonOp(compiler, *locs(), kind(), kNoBranch); | 738 EmitDoubleComparisonOp(compiler, *locs(), kind(), kNoBranch); |
| 739 return; | 739 return; |
| 740 } | 740 } |
| 741 const bool is_checked_strict_equal = | 741 const bool is_checked_strict_equal = |
| 742 HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid); | 742 HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid); |
| 743 if (is_checked_strict_equal) { | 743 if (is_checked_strict_equal) { |
| 744 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), kNoBranch, | 744 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), kNoBranch, |
| 745 deopt_id()); | 745 deopt_id()); |
| 746 return; | 746 return; |
| 747 } | 747 } |
| 748 if (HasICData() && (ic_data()->NumberOfChecks() > 0)) { | 748 if (IsPolymorphic()) { |
| 749 EmitGenericEqualityCompare(compiler, locs(), kind(), kNoBranch, *ic_data(), | 749 EmitGenericEqualityCompare(compiler, locs(), kind(), kNoBranch, *ic_data(), |
| 750 deopt_id(), token_pos()); | 750 deopt_id(), token_pos()); |
| 751 return; | 751 return; |
| 752 } | 752 } |
| 753 Register left = locs()->in(0).reg(); | 753 Register left = locs()->in(0).reg(); |
| 754 Register right = locs()->in(1).reg(); | 754 Register right = locs()->in(1).reg(); |
| 755 __ pushl(left); | 755 __ pushl(left); |
| 756 __ pushl(right); | 756 __ pushl(right); |
| 757 EmitEqualityAsInstanceCall(compiler, | 757 EmitEqualityAsInstanceCall(compiler, |
| 758 deopt_id(), | 758 deopt_id(), |
| (...skipping 21 matching lines...) Expand all Loading... |
| 780 EmitDoubleComparisonOp(compiler, *locs(), kind(), branch); | 780 EmitDoubleComparisonOp(compiler, *locs(), kind(), branch); |
| 781 return; | 781 return; |
| 782 } | 782 } |
| 783 const bool is_checked_strict_equal = | 783 const bool is_checked_strict_equal = |
| 784 HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid); | 784 HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid); |
| 785 if (is_checked_strict_equal) { | 785 if (is_checked_strict_equal) { |
| 786 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), branch, | 786 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), branch, |
| 787 deopt_id()); | 787 deopt_id()); |
| 788 return; | 788 return; |
| 789 } | 789 } |
| 790 if (HasICData() && (ic_data()->NumberOfChecks() > 0)) { | 790 if (IsPolymorphic()) { |
| 791 EmitGenericEqualityCompare(compiler, locs(), kind(), branch, *ic_data(), | 791 EmitGenericEqualityCompare(compiler, locs(), kind(), branch, *ic_data(), |
| 792 deopt_id(), token_pos()); | 792 deopt_id(), token_pos()); |
| 793 return; | 793 return; |
| 794 } | 794 } |
| 795 Register left = locs()->in(0).reg(); | 795 Register left = locs()->in(0).reg(); |
| 796 Register right = locs()->in(1).reg(); | 796 Register right = locs()->in(1).reg(); |
| 797 __ pushl(left); | 797 __ pushl(left); |
| 798 __ pushl(right); | 798 __ pushl(right); |
| 799 EmitEqualityAsInstanceCall(compiler, | 799 EmitEqualityAsInstanceCall(compiler, |
| 800 deopt_id(), | 800 deopt_id(), |
| (...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2577 __ pcmpeqq(XMM0, XMM0); // Generate all 1's. | 2577 __ pcmpeqq(XMM0, XMM0); // Generate all 1's. |
| 2578 __ pxor(value, XMM0); | 2578 __ pxor(value, XMM0); |
| 2579 } | 2579 } |
| 2580 | 2580 |
| 2581 | 2581 |
| 2582 } // namespace dart | 2582 } // namespace dart |
| 2583 | 2583 |
| 2584 #undef __ | 2584 #undef __ |
| 2585 | 2585 |
| 2586 #endif // defined TARGET_ARCH_X64 | 2586 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |