| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 locs->set_out(Location::RegisterLocation(RAX)); | 316 locs->set_out(Location::RegisterLocation(RAX)); |
| 317 return locs; | 317 return locs; |
| 318 } | 318 } |
| 319 | 319 |
| 320 | 320 |
| 321 static void EmitEqualityAsInstanceCall(FlowGraphCompiler* compiler, | 321 static void EmitEqualityAsInstanceCall(FlowGraphCompiler* compiler, |
| 322 intptr_t deopt_id, | 322 intptr_t deopt_id, |
| 323 intptr_t token_pos, | 323 intptr_t token_pos, |
| 324 Token::Kind kind, | 324 Token::Kind kind, |
| 325 LocationSummary* locs) { | 325 LocationSummary* locs) { |
| 326 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, | 326 if (!compiler->is_optimizing()) { |
| 327 deopt_id, | 327 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, |
| 328 token_pos); | 328 deopt_id, |
| 329 token_pos); |
| 330 } |
| 329 const String& operator_name = String::ZoneHandle(Symbols::New("==")); | 331 const String& operator_name = String::ZoneHandle(Symbols::New("==")); |
| 330 const int kNumberOfArguments = 2; | 332 const int kNumberOfArguments = 2; |
| 331 const Array& kNoArgumentNames = Array::Handle(); | 333 const Array& kNoArgumentNames = Array::Handle(); |
| 332 const int kNumArgumentsChecked = 2; | 334 const int kNumArgumentsChecked = 2; |
| 333 | 335 |
| 334 Label done, false_label, true_label; | 336 Label done, false_label, true_label; |
| 335 Register left = locs->in(0).reg(); | 337 Register left = locs->in(0).reg(); |
| 336 Register right = locs->in(1).reg(); | 338 Register right = locs->in(1).reg(); |
| 337 __ popq(right); | 339 __ popq(right); |
| 338 __ popq(left); | 340 __ popq(left); |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 kNumArguments, | 802 kNumArguments, |
| 801 Array::Handle(), // No named arguments. | 803 Array::Handle(), // No named arguments. |
| 802 deopt, // Deoptimize target. | 804 deopt, // Deoptimize target. |
| 803 deopt_id(), | 805 deopt_id(), |
| 804 token_pos(), | 806 token_pos(), |
| 805 locs()); | 807 locs()); |
| 806 return; | 808 return; |
| 807 } | 809 } |
| 808 const String& function_name = | 810 const String& function_name = |
| 809 String::ZoneHandle(Symbols::New(Token::Str(kind()))); | 811 String::ZoneHandle(Symbols::New(Token::Str(kind()))); |
| 810 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, | 812 if (!compiler->is_optimizing()) { |
| 811 deopt_id(), | 813 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, |
| 812 token_pos()); | 814 deopt_id(), |
| 815 token_pos()); |
| 816 } |
| 813 const intptr_t kNumArguments = 2; | 817 const intptr_t kNumArguments = 2; |
| 814 const intptr_t kNumArgsChecked = 2; // Type-feedback. | 818 const intptr_t kNumArgsChecked = 2; // Type-feedback. |
| 815 compiler->GenerateInstanceCall(deopt_id(), | 819 compiler->GenerateInstanceCall(deopt_id(), |
| 816 token_pos(), | 820 token_pos(), |
| 817 function_name, | 821 function_name, |
| 818 kNumArguments, | 822 kNumArguments, |
| 819 Array::ZoneHandle(), // No optional arguments. | 823 Array::ZoneHandle(), // No optional arguments. |
| 820 kNumArgsChecked, | 824 kNumArgsChecked, |
| 821 locs()); | 825 locs()); |
| 822 } | 826 } |
| (...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2244 __ j(ABOVE_EQUAL, deopt); | 2248 __ j(ABOVE_EQUAL, deopt); |
| 2245 } | 2249 } |
| 2246 } | 2250 } |
| 2247 | 2251 |
| 2248 | 2252 |
| 2249 } // namespace dart | 2253 } // namespace dart |
| 2250 | 2254 |
| 2251 #undef __ | 2255 #undef __ |
| 2252 | 2256 |
| 2253 #endif // defined TARGET_ARCH_X64 | 2257 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |