| 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_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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 locs->set_in(0, Location::RegisterOrConstant(left())); | 412 locs->set_in(0, Location::RegisterOrConstant(left())); |
| 413 // Only one input can be a constant operand. The case of two constant | 413 // Only one input can be a constant operand. The case of two constant |
| 414 // operands should be handled by constant propagation. | 414 // operands should be handled by constant propagation. |
| 415 // Only right can be a stack slot. | 415 // Only right can be a stack slot. |
| 416 locs->set_in(1, locs->in(0).IsConstant() | 416 locs->set_in(1, locs->in(0).IsConstant() |
| 417 ? Location::RequiresRegister() | 417 ? Location::RequiresRegister() |
| 418 : Location::RegisterOrConstant(right())); | 418 : Location::RegisterOrConstant(right())); |
| 419 locs->set_out(Location::RequiresRegister()); | 419 locs->set_out(Location::RequiresRegister()); |
| 420 return locs; | 420 return locs; |
| 421 } | 421 } |
| 422 if (is_checked_strict_equal()) { | 422 if (IsCheckedStrictEqual()) { |
| 423 const intptr_t kNumTemps = 1; | 423 const intptr_t kNumTemps = 1; |
| 424 LocationSummary* locs = | 424 LocationSummary* locs = |
| 425 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 425 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 426 locs->set_in(0, Location::RequiresRegister()); | 426 locs->set_in(0, Location::RequiresRegister()); |
| 427 locs->set_in(1, Location::RequiresRegister()); | 427 locs->set_in(1, Location::RequiresRegister()); |
| 428 locs->set_temp(0, Location::RequiresRegister()); | 428 locs->set_temp(0, Location::RequiresRegister()); |
| 429 locs->set_out(Location::RequiresRegister()); | 429 locs->set_out(Location::RequiresRegister()); |
| 430 return locs; | 430 return locs; |
| 431 } | 431 } |
| 432 if (IsPolymorphic()) { | 432 if (IsPolymorphic()) { |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 if (receiver_class_id() == kSmiCid) { | 844 if (receiver_class_id() == kSmiCid) { |
| 845 // Deoptimizes if both arguments not Smi. | 845 // Deoptimizes if both arguments not Smi. |
| 846 EmitSmiComparisonOp(compiler, *locs(), kind(), kNoBranch); | 846 EmitSmiComparisonOp(compiler, *locs(), kind(), kNoBranch); |
| 847 return; | 847 return; |
| 848 } | 848 } |
| 849 if (receiver_class_id() == kDoubleCid) { | 849 if (receiver_class_id() == kDoubleCid) { |
| 850 // Deoptimizes if both arguments are Smi, or if none is Double or Smi. | 850 // Deoptimizes if both arguments are Smi, or if none is Double or Smi. |
| 851 EmitDoubleComparisonOp(compiler, *locs(), kind(), kNoBranch); | 851 EmitDoubleComparisonOp(compiler, *locs(), kind(), kNoBranch); |
| 852 return; | 852 return; |
| 853 } | 853 } |
| 854 if (is_checked_strict_equal()) { | 854 if (IsCheckedStrictEqual()) { |
| 855 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), kNoBranch, | 855 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), kNoBranch, |
| 856 deopt_id()); | 856 deopt_id()); |
| 857 return; | 857 return; |
| 858 } | 858 } |
| 859 if (IsPolymorphic()) { | 859 if (IsPolymorphic()) { |
| 860 EmitGenericEqualityCompare(compiler, locs(), kind(), kNoBranch, *ic_data(), | 860 EmitGenericEqualityCompare(compiler, locs(), kind(), kNoBranch, *ic_data(), |
| 861 deopt_id(), token_pos()); | 861 deopt_id(), token_pos()); |
| 862 return; | 862 return; |
| 863 } | 863 } |
| 864 Register left = locs()->in(0).reg(); | 864 Register left = locs()->in(0).reg(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 881 if (receiver_class_id() == kSmiCid) { | 881 if (receiver_class_id() == kSmiCid) { |
| 882 // Deoptimizes if both arguments not Smi. | 882 // Deoptimizes if both arguments not Smi. |
| 883 EmitSmiComparisonOp(compiler, *locs(), kind(), branch); | 883 EmitSmiComparisonOp(compiler, *locs(), kind(), branch); |
| 884 return; | 884 return; |
| 885 } | 885 } |
| 886 if (receiver_class_id() == kDoubleCid) { | 886 if (receiver_class_id() == kDoubleCid) { |
| 887 // Deoptimizes if both arguments are Smi, or if none is Double or Smi. | 887 // Deoptimizes if both arguments are Smi, or if none is Double or Smi. |
| 888 EmitDoubleComparisonOp(compiler, *locs(), kind(), branch); | 888 EmitDoubleComparisonOp(compiler, *locs(), kind(), branch); |
| 889 return; | 889 return; |
| 890 } | 890 } |
| 891 if (is_checked_strict_equal()) { | 891 if (IsCheckedStrictEqual()) { |
| 892 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), branch, | 892 EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), branch, |
| 893 deopt_id()); | 893 deopt_id()); |
| 894 return; | 894 return; |
| 895 } | 895 } |
| 896 if (IsPolymorphic()) { | 896 if (IsPolymorphic()) { |
| 897 EmitGenericEqualityCompare(compiler, locs(), kind(), branch, *ic_data(), | 897 EmitGenericEqualityCompare(compiler, locs(), kind(), branch, *ic_data(), |
| 898 deopt_id(), token_pos()); | 898 deopt_id(), token_pos()); |
| 899 return; | 899 return; |
| 900 } | 900 } |
| 901 Register left = locs()->in(0).reg(); | 901 Register left = locs()->in(0).reg(); |
| (...skipping 3515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4417 PcDescriptors::kOther, | 4417 PcDescriptors::kOther, |
| 4418 locs()); | 4418 locs()); |
| 4419 __ Drop(2); // Discard type arguments and receiver. | 4419 __ Drop(2); // Discard type arguments and receiver. |
| 4420 } | 4420 } |
| 4421 | 4421 |
| 4422 } // namespace dart | 4422 } // namespace dart |
| 4423 | 4423 |
| 4424 #undef __ | 4424 #undef __ |
| 4425 | 4425 |
| 4426 #endif // defined TARGET_ARCH_X64 | 4426 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |