OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
9 | 9 |
10 #include "vm/instructions.h" | 10 #include "vm/instructions.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 } | 46 } |
47 | 47 |
48 | 48 |
49 intptr_t CodePatcher::InstanceCallSizeInBytes() { | 49 intptr_t CodePatcher::InstanceCallSizeInBytes() { |
50 // The instance call instruction sequence has a variable size on MIPS. | 50 // The instance call instruction sequence has a variable size on MIPS. |
51 UNREACHABLE(); | 51 UNREACHABLE(); |
52 return 0; | 52 return 0; |
53 } | 53 } |
54 | 54 |
55 | 55 |
56 RawFunction* CodePatcher::GetUnoptimizedStaticCallAt( | 56 RawFunction* CodePatcher::GetUnoptimizedStaticCallAt(uword return_address, |
57 uword return_address, const Code& code, ICData* ic_data_result) { | 57 const Code& code, |
| 58 ICData* ic_data_result) { |
58 ASSERT(code.ContainsInstructionAt(return_address)); | 59 ASSERT(code.ContainsInstructionAt(return_address)); |
59 CallPattern static_call(return_address, code); | 60 CallPattern static_call(return_address, code); |
60 ICData& ic_data = ICData::Handle(); | 61 ICData& ic_data = ICData::Handle(); |
61 ic_data ^= static_call.IcData(); | 62 ic_data ^= static_call.IcData(); |
62 if (ic_data_result != NULL) { | 63 if (ic_data_result != NULL) { |
63 *ic_data_result = ic_data.raw(); | 64 *ic_data_result = ic_data.raw(); |
64 } | 65 } |
65 return ic_data.GetTargetAt(0); | 66 return ic_data.GetTargetAt(0); |
66 } | 67 } |
67 | 68 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 NativeFunction* target) { | 110 NativeFunction* target) { |
110 ASSERT(code.ContainsInstructionAt(return_address)); | 111 ASSERT(code.ContainsInstructionAt(return_address)); |
111 NativeCallPattern call(return_address, code); | 112 NativeCallPattern call(return_address, code); |
112 *target = call.native_function(); | 113 *target = call.native_function(); |
113 return call.target(); | 114 return call.target(); |
114 } | 115 } |
115 | 116 |
116 } // namespace dart | 117 } // namespace dart |
117 | 118 |
118 #endif // defined TARGET_ARCH_MIPS | 119 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |