| 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 // Class for patching compiled code. | 4 // Class for patching compiled code. |
| 5 | 5 |
| 6 #ifndef VM_CODE_PATCHER_H_ | 6 #ifndef VM_CODE_PATCHER_H_ |
| 7 #define VM_CODE_PATCHER_H_ | 7 #define VM_CODE_PATCHER_H_ |
| 8 | 8 |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/native_entry.h" |
| 10 | 11 |
| 11 namespace dart { | 12 namespace dart { |
| 12 | 13 |
| 13 // Forward declaration. | 14 // Forward declaration. |
| 14 class Array; | 15 class Array; |
| 15 class Code; | 16 class Code; |
| 16 class ExternalLabel; | 17 class ExternalLabel; |
| 17 class Function; | 18 class Function; |
| 18 class ICData; | 19 class ICData; |
| 19 class RawArray; | 20 class RawArray; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 static RawFunction* GetUnoptimizedStaticCallAt(uword return_address, | 82 static RawFunction* GetUnoptimizedStaticCallAt(uword return_address, |
| 82 const Code& code, | 83 const Code& code, |
| 83 ICData* ic_data); | 84 ICData* ic_data); |
| 84 | 85 |
| 85 static intptr_t InstanceCallSizeInBytes(); | 86 static intptr_t InstanceCallSizeInBytes(); |
| 86 | 87 |
| 87 static void InsertCallAt(uword start, uword target); | 88 static void InsertCallAt(uword start, uword target); |
| 88 | 89 |
| 89 static RawObject* GetEdgeCounterAt(uword pc, const Code& code); | 90 static RawObject* GetEdgeCounterAt(uword pc, const Code& code); |
| 90 | 91 |
| 91 static int32_t GetPoolOffsetAt(uword return_address); | |
| 92 static void SetPoolOffsetAt(uword return_address, int32_t offset); | |
| 93 static void PatchPoolPointerCallAt(uword return_address, | 92 static void PatchPoolPointerCallAt(uword return_address, |
| 94 const Code& code, | 93 const Code& code, |
| 95 uword new_target); | 94 uword new_target); |
| 95 |
| 96 static uword GetNativeCallAt(uword return_address, |
| 97 const Code& code, |
| 98 NativeFunction* target); |
| 99 |
| 100 static void PatchNativeCallAt(uword return_address, |
| 101 const Code& code, |
| 102 NativeFunction target, |
| 103 const Code& trampoline); |
| 96 }; | 104 }; |
| 97 | 105 |
| 98 } // namespace dart | 106 } // namespace dart |
| 99 | 107 |
| 100 #endif // VM_CODE_PATCHER_H_ | 108 #endif // VM_CODE_PATCHER_H_ |
| OLD | NEW |