| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 | 70 |
| 71 class InstanceCall : public UnoptimizedCall { | 71 class InstanceCall : public UnoptimizedCall { |
| 72 public: | 72 public: |
| 73 explicit InstanceCall(uword return_address) | 73 explicit InstanceCall(uword return_address) |
| 74 : UnoptimizedCall(return_address) { | 74 : UnoptimizedCall(return_address) { |
| 75 #if defined(DEBUG) | 75 #if defined(DEBUG) |
| 76 ICData& test_ic_data = ICData::Handle(); | 76 ICData& test_ic_data = ICData::Handle(); |
| 77 test_ic_data ^= ic_data(); | 77 test_ic_data ^= ic_data(); |
| 78 ASSERT(test_ic_data.num_args_tested() > 0); | 78 ASSERT(test_ic_data.NumArgsTested() > 0); |
| 79 #endif // DEBUG | 79 #endif // DEBUG |
| 80 } | 80 } |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceCall); | 83 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceCall); |
| 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.NumArgsTested() >= 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { | 299 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { |
| 300 ASSERT(code.ContainsInstructionAt(pc)); | 300 ASSERT(code.ContainsInstructionAt(pc)); |
| 301 EdgeCounter counter(pc, code); | 301 EdgeCounter counter(pc, code); |
| 302 return counter.edge_counter(); | 302 return counter.edge_counter(); |
| 303 } | 303 } |
| 304 | 304 |
| 305 } // namespace dart | 305 } // namespace dart |
| 306 | 306 |
| 307 #endif // defined TARGET_ARCH_IA32 | 307 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |