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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 }; | 66 }; |
67 | 67 |
68 | 68 |
69 class InstanceCall : public UnoptimizedCall { | 69 class InstanceCall : public UnoptimizedCall { |
70 public: | 70 public: |
71 InstanceCall(uword return_address, const Code& code) | 71 InstanceCall(uword return_address, const Code& code) |
72 : UnoptimizedCall(return_address, code) { | 72 : UnoptimizedCall(return_address, code) { |
73 #if defined(DEBUG) | 73 #if defined(DEBUG) |
74 ICData& test_ic_data = ICData::Handle(); | 74 ICData& test_ic_data = ICData::Handle(); |
75 test_ic_data ^= ic_data(); | 75 test_ic_data ^= ic_data(); |
76 ASSERT(test_ic_data.num_args_tested() > 0); | 76 ASSERT(test_ic_data.NumArgsTested() > 0); |
77 #endif // DEBUG | 77 #endif // DEBUG |
78 } | 78 } |
79 | 79 |
80 private: | 80 private: |
81 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceCall); | 81 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceCall); |
82 }; | 82 }; |
83 | 83 |
84 | 84 |
85 class UnoptimizedStaticCall : public UnoptimizedCall { | 85 class UnoptimizedStaticCall : public UnoptimizedCall { |
86 public: | 86 public: |
87 UnoptimizedStaticCall(uword return_address, const Code& code) | 87 UnoptimizedStaticCall(uword return_address, const Code& code) |
88 : UnoptimizedCall(return_address, code) { | 88 : UnoptimizedCall(return_address, code) { |
89 #if defined(DEBUG) | 89 #if defined(DEBUG) |
90 ICData& test_ic_data = ICData::Handle(); | 90 ICData& test_ic_data = ICData::Handle(); |
91 test_ic_data ^= ic_data(); | 91 test_ic_data ^= ic_data(); |
92 ASSERT(test_ic_data.num_args_tested() >= 0); | 92 ASSERT(test_ic_data.NumArgsTested() >= 0); |
93 #endif // DEBUG | 93 #endif // DEBUG |
94 } | 94 } |
95 | 95 |
96 private: | 96 private: |
97 DISALLOW_IMPLICIT_CONSTRUCTORS(UnoptimizedStaticCall); | 97 DISALLOW_IMPLICIT_CONSTRUCTORS(UnoptimizedStaticCall); |
98 }; | 98 }; |
99 | 99 |
100 | 100 |
101 // The expected pattern of a dart static call: | 101 // The expected pattern of a dart static call: |
102 // 00 mov R10, arguments_descriptor_array (10 bytes) (optional in polym. calls) | 102 // 00 mov R10, arguments_descriptor_array (10 bytes) (optional in polym. calls) |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 329 |
330 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { | 330 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { |
331 ASSERT(code.ContainsInstructionAt(pc)); | 331 ASSERT(code.ContainsInstructionAt(pc)); |
332 EdgeCounter counter(pc, code); | 332 EdgeCounter counter(pc, code); |
333 return counter.edge_counter(); | 333 return counter.edge_counter(); |
334 } | 334 } |
335 | 335 |
336 } // namespace dart | 336 } // namespace dart |
337 | 337 |
338 #endif // defined TARGET_ARCH_X64 | 338 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |