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 RUNTIME_VM_CODE_PATCHER_H_ | 6 #ifndef RUNTIME_VM_CODE_PATCHER_H_ |
7 #define RUNTIME_VM_CODE_PATCHER_H_ | 7 #define RUNTIME_VM_CODE_PATCHER_H_ |
8 | 8 |
9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
10 #include "vm/native_entry.h" | 10 #include "vm/native_entry.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 ICData* ic_data); | 61 ICData* ic_data); |
62 | 62 |
63 // Return target of an unoptimized static call and its ICData object | 63 // Return target of an unoptimized static call and its ICData object |
64 // (calls target via a stub). | 64 // (calls target via a stub). |
65 static RawFunction* GetUnoptimizedStaticCallAt(uword return_address, | 65 static RawFunction* GetUnoptimizedStaticCallAt(uword return_address, |
66 const Code& code, | 66 const Code& code, |
67 ICData* ic_data); | 67 ICData* ic_data); |
68 | 68 |
69 static intptr_t InstanceCallSizeInBytes(); | 69 static intptr_t InstanceCallSizeInBytes(); |
70 | 70 |
71 static void InsertDeoptimizationCallAt(uword start); | |
rmacnak
2017/03/09 20:31:59
Sweet!
| |
72 | |
73 static void PatchPoolPointerCallAt(uword return_address, | 71 static void PatchPoolPointerCallAt(uword return_address, |
74 const Code& code, | 72 const Code& code, |
75 const Code& new_target); | 73 const Code& new_target); |
76 | 74 |
77 static void PatchSwitchableCallAt(uword return_address, | 75 static void PatchSwitchableCallAt(uword return_address, |
78 const Code& caller_code, | 76 const Code& caller_code, |
79 const Object& data, | 77 const Object& data, |
80 const Code& target); | 78 const Code& target); |
81 static RawObject* GetSwitchableCallDataAt(uword return_address, | 79 static RawObject* GetSwitchableCallDataAt(uword return_address, |
82 const Code& caller_code); | 80 const Code& caller_code); |
83 static RawCode* GetSwitchableCallTargetAt(uword return_address, | 81 static RawCode* GetSwitchableCallTargetAt(uword return_address, |
84 const Code& caller_code); | 82 const Code& caller_code); |
85 | 83 |
86 static RawCode* GetNativeCallAt(uword return_address, | 84 static RawCode* GetNativeCallAt(uword return_address, |
87 const Code& code, | 85 const Code& code, |
88 NativeFunction* target); | 86 NativeFunction* target); |
89 | 87 |
90 static void PatchNativeCallAt(uword return_address, | 88 static void PatchNativeCallAt(uword return_address, |
91 const Code& code, | 89 const Code& code, |
92 NativeFunction target, | 90 NativeFunction target, |
93 const Code& trampoline); | 91 const Code& trampoline); |
94 }; | 92 }; |
95 | 93 |
96 } // namespace dart | 94 } // namespace dart |
97 | 95 |
98 #endif // RUNTIME_VM_CODE_PATCHER_H_ | 96 #endif // RUNTIME_VM_CODE_PATCHER_H_ |
OLD | NEW |