| 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 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 static uword GetInstanceCallAt(uword return_address, | 75 static uword GetInstanceCallAt(uword return_address, |
| 76 const Code& code, | 76 const Code& code, |
| 77 ICData* ic_data); | 77 ICData* ic_data); |
| 78 | 78 |
| 79 // Return target of an unoptimized static call and its ICData object | 79 // Return target of an unoptimized static call and its ICData object |
| 80 // (calls target via a stub). | 80 // (calls target via a stub). |
| 81 static RawFunction* GetUnoptimizedStaticCallAt(uword return_address, | 81 static RawFunction* GetUnoptimizedStaticCallAt(uword return_address, |
| 82 const Code& code, | 82 const Code& code, |
| 83 ICData* ic_data); | 83 ICData* ic_data); |
| 84 | 84 |
| 85 // Return the arguments descriptor array of the closure call | |
| 86 // before the given return address. | |
| 87 static RawArray* GetClosureArgDescAt(uword return_address, | |
| 88 const Code& code); | |
| 89 | |
| 90 static intptr_t InstanceCallSizeInBytes(); | 85 static intptr_t InstanceCallSizeInBytes(); |
| 91 | 86 |
| 92 static void InsertCallAt(uword start, uword target); | 87 static void InsertCallAt(uword start, uword target); |
| 93 | 88 |
| 94 static RawObject* GetEdgeCounterAt(uword pc, const Code& code); | 89 static RawObject* GetEdgeCounterAt(uword pc, const Code& code); |
| 95 | 90 |
| 96 static int32_t GetPoolOffsetAt(uword return_address); | 91 static int32_t GetPoolOffsetAt(uword return_address); |
| 97 static void SetPoolOffsetAt(uword return_address, int32_t offset); | 92 static void SetPoolOffsetAt(uword return_address, int32_t offset); |
| 98 }; | 93 }; |
| 99 | 94 |
| 100 } // namespace dart | 95 } // namespace dart |
| 101 | 96 |
| 102 #endif // VM_CODE_PATCHER_H_ | 97 #endif // VM_CODE_PATCHER_H_ |
| OLD | NEW |