| 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/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/code_patcher.h" | 9 #include "vm/code_patcher.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 | 77 |
| 78 class UnoptimizedStaticCall : public UnoptimizedCall { | 78 class UnoptimizedStaticCall : public UnoptimizedCall { |
| 79 public: | 79 public: |
| 80 explicit UnoptimizedStaticCall(uword return_address) | 80 explicit UnoptimizedStaticCall(uword return_address) |
| 81 : UnoptimizedCall(return_address) { | 81 : UnoptimizedCall(return_address) { |
| 82 #if defined(DEBUG) | 82 #if defined(DEBUG) |
| 83 ICData& test_ic_data = ICData::Handle(); | 83 ICData& test_ic_data = ICData::Handle(); |
| 84 test_ic_data ^= ic_data(); | 84 test_ic_data ^= ic_data(); |
| 85 ASSERT(test_ic_data.num_args_tested() == 0); | 85 ASSERT(test_ic_data.num_args_tested() >= 0); |
| 86 #endif // DEBUG | 86 #endif // DEBUG |
| 87 } | 87 } |
| 88 | 88 |
| 89 private: | 89 private: |
| 90 DISALLOW_IMPLICIT_CONSTRUCTORS(UnoptimizedStaticCall); | 90 DISALLOW_IMPLICIT_CONSTRUCTORS(UnoptimizedStaticCall); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 | 93 |
| 94 // The expected pattern of a dart static call: | 94 // The expected pattern of a dart static call: |
| 95 // mov R10, arguments_descriptor_array (10 bytes) (optional in polym. calls) | 95 // mov R10, arguments_descriptor_array (10 bytes) (optional in polym. calls) |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 ic_data ^= static_call.ic_data(); | 232 ic_data ^= static_call.ic_data(); |
| 233 if (ic_data_result != NULL) { | 233 if (ic_data_result != NULL) { |
| 234 *ic_data_result = ic_data.raw(); | 234 *ic_data_result = ic_data.raw(); |
| 235 } | 235 } |
| 236 return ic_data.GetTargetAt(0); | 236 return ic_data.GetTargetAt(0); |
| 237 } | 237 } |
| 238 | 238 |
| 239 } // namespace dart | 239 } // namespace dart |
| 240 | 240 |
| 241 #endif // defined TARGET_ARCH_X64 | 241 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |