| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // in given code. | 49 // in given code. |
| 50 static uword GetStaticCallTargetAt(uword return_address, const Code& code); | 50 static uword GetStaticCallTargetAt(uword return_address, const Code& code); |
| 51 | 51 |
| 52 // Get instance call information. Returns the call target and sets each | 52 // Get instance call information. Returns the call target and sets each |
| 53 // of the output parameters ic_data and arguments_descriptor if they are | 53 // of the output parameters ic_data and arguments_descriptor if they are |
| 54 // non-NULL. | 54 // non-NULL. |
| 55 static uword GetInstanceCallAt(uword return_address, | 55 static uword GetInstanceCallAt(uword return_address, |
| 56 const Code& code, | 56 const Code& code, |
| 57 ICData* ic_data); | 57 ICData* ic_data); |
| 58 | 58 |
| 59 // Return target of an unoptimized static call (calls target via a stub). | 59 // Return target of an unoptimized static call and its ICData object |
| 60 static RawFunction* GetUnoptimizedStaticCallTargetAt(uword return_address, | 60 // (calls target via a stub). |
| 61 const Code& code); | 61 static RawFunction* GetUnoptimizedStaticCallAt(uword return_address, |
| 62 const Code& code, |
| 63 ICData* ic_data); |
| 62 | 64 |
| 63 // Return the arguments descriptor array of the closure call | 65 // Return the arguments descriptor array of the closure call |
| 64 // before the given return address. | 66 // before the given return address. |
| 65 static RawArray* GetClosureArgDescAt(uword return_address, | 67 static RawArray* GetClosureArgDescAt(uword return_address, |
| 66 const Code& code); | 68 const Code& code); |
| 67 | 69 |
| 68 static intptr_t InstanceCallSizeInBytes(); | 70 static intptr_t InstanceCallSizeInBytes(); |
| 69 | 71 |
| 70 static void InsertCallAt(uword start, uword target); | 72 static void InsertCallAt(uword start, uword target); |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 } // namespace dart | 75 } // namespace dart |
| 74 | 76 |
| 75 #endif // VM_CODE_PATCHER_H_ | 77 #endif // VM_CODE_PATCHER_H_ |
| OLD | NEW |