| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 if (is_checked_strict_equal) { | 301 if (is_checked_strict_equal) { |
| 302 const intptr_t kNumTemps = 1; | 302 const intptr_t kNumTemps = 1; |
| 303 LocationSummary* locs = | 303 LocationSummary* locs = |
| 304 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 304 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 305 locs->set_in(0, Location::RequiresRegister()); | 305 locs->set_in(0, Location::RequiresRegister()); |
| 306 locs->set_in(1, Location::RequiresRegister()); | 306 locs->set_in(1, Location::RequiresRegister()); |
| 307 locs->set_temp(0, Location::RequiresRegister()); | 307 locs->set_temp(0, Location::RequiresRegister()); |
| 308 locs->set_out(Location::RequiresRegister()); | 308 locs->set_out(Location::RequiresRegister()); |
| 309 return locs; | 309 return locs; |
| 310 } | 310 } |
| 311 if (HasICData() && (ic_data()->NumberOfChecks() > 0)) { | 311 if (IsPolymorphic()) { |
| 312 const intptr_t kNumTemps = 1; | 312 const intptr_t kNumTemps = 1; |
| 313 LocationSummary* locs = | 313 LocationSummary* locs = |
| 314 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 314 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
| 315 locs->set_in(0, Location::RegisterLocation(RCX)); | 315 locs->set_in(0, Location::RegisterLocation(RCX)); |
| 316 locs->set_in(1, Location::RegisterLocation(RDX)); | 316 locs->set_in(1, Location::RegisterLocation(RDX)); |
| 317 locs->set_temp(0, Location::RegisterLocation(RBX)); | 317 locs->set_temp(0, Location::RegisterLocation(RBX)); |
| 318 locs->set_out(Location::RegisterLocation(RAX)); | 318 locs->set_out(Location::RegisterLocation(RAX)); |
| 319 return locs; | 319 return locs; |
| 320 } | 320 } |
| 321 const intptr_t kNumTemps = 1; | 321 const intptr_t kNumTemps = 1; |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 EmitDoubleComparisonOp(compiler, *locs(), kind(), kNoBranch); | 693 EmitDoubleComparisonOp(compiler, *locs(), kind(), kNoBranch); |
| 694 return; | 694 return; |
| 695 } | 695 } |
| 696 const bool is_checked_strict_equal = | 696 const bool is_checked_strict_equal = |
| 697 HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid); | 697 HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid); |
| 698 if (is_checked_strict_equal) { | 698 if (is_checked_strict_equal) { |
| 699 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), kNoBranch, | 699 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), kNoBranch, |
| 700 deopt_id()); | 700 deopt_id()); |
| 701 return; | 701 return; |
| 702 } | 702 } |
| 703 if (HasICData() && (ic_data()->NumberOfChecks() > 0)) { | 703 if (IsPolymorphic()) { |
| 704 EmitGenericEqualityCompare(compiler, locs(), kind(), kNoBranch, *ic_data(), | 704 EmitGenericEqualityCompare(compiler, locs(), kind(), kNoBranch, *ic_data(), |
| 705 deopt_id(), token_pos()); | 705 deopt_id(), token_pos()); |
| 706 return; | 706 return; |
| 707 } | 707 } |
| 708 Register left = locs()->in(0).reg(); | 708 Register left = locs()->in(0).reg(); |
| 709 Register right = locs()->in(1).reg(); | 709 Register right = locs()->in(1).reg(); |
| 710 __ pushq(left); | 710 __ pushq(left); |
| 711 __ pushq(right); | 711 __ pushq(right); |
| 712 EmitEqualityAsInstanceCall(compiler, | 712 EmitEqualityAsInstanceCall(compiler, |
| 713 deopt_id(), | 713 deopt_id(), |
| (...skipping 18 matching lines...) Expand all Loading... |
| 732 EmitDoubleComparisonOp(compiler, *locs(), kind(), branch); | 732 EmitDoubleComparisonOp(compiler, *locs(), kind(), branch); |
| 733 return; | 733 return; |
| 734 } | 734 } |
| 735 const bool is_checked_strict_equal = | 735 const bool is_checked_strict_equal = |
| 736 HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid); | 736 HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid); |
| 737 if (is_checked_strict_equal) { | 737 if (is_checked_strict_equal) { |
| 738 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), branch, | 738 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), branch, |
| 739 deopt_id()); | 739 deopt_id()); |
| 740 return; | 740 return; |
| 741 } | 741 } |
| 742 if (HasICData() && (ic_data()->NumberOfChecks() > 0)) { | 742 if (IsPolymorphic()) { |
| 743 EmitGenericEqualityCompare(compiler, locs(), kind(), branch, *ic_data(), | 743 EmitGenericEqualityCompare(compiler, locs(), kind(), branch, *ic_data(), |
| 744 deopt_id(), token_pos()); | 744 deopt_id(), token_pos()); |
| 745 return; | 745 return; |
| 746 } | 746 } |
| 747 Register left = locs()->in(0).reg(); | 747 Register left = locs()->in(0).reg(); |
| 748 Register right = locs()->in(1).reg(); | 748 Register right = locs()->in(1).reg(); |
| 749 __ pushq(left); | 749 __ pushq(left); |
| 750 __ pushq(right); | 750 __ pushq(right); |
| 751 EmitEqualityAsInstanceCall(compiler, | 751 EmitEqualityAsInstanceCall(compiler, |
| 752 deopt_id(), | 752 deopt_id(), |
| (...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2299 | 2299 |
| 2300 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2300 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2301 UNIMPLEMENTED(); | 2301 UNIMPLEMENTED(); |
| 2302 } | 2302 } |
| 2303 | 2303 |
| 2304 } // namespace dart | 2304 } // namespace dart |
| 2305 | 2305 |
| 2306 #undef __ | 2306 #undef __ |
| 2307 | 2307 |
| 2308 #endif // defined TARGET_ARCH_X64 | 2308 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |