| 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/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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 | 86 |
| 87 class UnoptimizedStaticCall : public UnoptimizedCall { | 87 class UnoptimizedStaticCall : public UnoptimizedCall { |
| 88 public: | 88 public: |
| 89 explicit UnoptimizedStaticCall(uword return_address) | 89 explicit UnoptimizedStaticCall(uword return_address) |
| 90 : UnoptimizedCall(return_address) { | 90 : UnoptimizedCall(return_address) { |
| 91 #if defined(DEBUG) | 91 #if defined(DEBUG) |
| 92 ICData& test_ic_data = ICData::Handle(); | 92 ICData& test_ic_data = ICData::Handle(); |
| 93 test_ic_data ^= ic_data(); | 93 test_ic_data ^= ic_data(); |
| 94 ASSERT(test_ic_data.num_args_tested() == 0); | 94 ASSERT(test_ic_data.num_args_tested() >= 0); |
| 95 #endif // DEBUG | 95 #endif // DEBUG |
| 96 } | 96 } |
| 97 | 97 |
| 98 private: | 98 private: |
| 99 DISALLOW_IMPLICIT_CONSTRUCTORS(UnoptimizedStaticCall); | 99 DISALLOW_IMPLICIT_CONSTRUCTORS(UnoptimizedStaticCall); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 | 102 |
| 103 // The expected pattern of a dart static call: | 103 // The expected pattern of a dart static call: |
| 104 // mov EDX, arguments_descriptor_array (optional in polymorphic calls) | 104 // mov EDX, arguments_descriptor_array (optional in polymorphic calls) |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 } | 255 } |
| 256 | 256 |
| 257 | 257 |
| 258 intptr_t CodePatcher::InstanceCallSizeInBytes() { | 258 intptr_t CodePatcher::InstanceCallSizeInBytes() { |
| 259 return InstanceCall::kNumInstructions * InstanceCall::kInstructionSize; | 259 return InstanceCall::kNumInstructions * InstanceCall::kInstructionSize; |
| 260 } | 260 } |
| 261 | 261 |
| 262 } // namespace dart | 262 } // namespace dart |
| 263 | 263 |
| 264 #endif // defined TARGET_ARCH_IA32 | 264 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |