Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: runtime/vm/code_patcher.h

Issue 70183010: Fixes a couple problems with GC of unoptimized code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 24 matching lines...) Expand all
35 static void PatchInstanceCallAt(uword return_address, 35 static void PatchInstanceCallAt(uword return_address,
36 const Code& code, 36 const Code& code,
37 uword new_target_address); 37 uword new_target_address);
38 38
39 // Patch entry point with a jump as specified in the code's patch region. 39 // Patch entry point with a jump as specified in the code's patch region.
40 static void PatchEntry(const Code& code); 40 static void PatchEntry(const Code& code);
41 41
42 // Restore entry point with original code (i.e., before patching). 42 // Restore entry point with original code (i.e., before patching).
43 static void RestoreEntry(const Code& code); 43 static void RestoreEntry(const Code& code);
44 44
45 // Returns true if the code can be patched with a jump at beginnning (checks 45 // Returns true if the code can be patched with a jump at beginning (checks
46 // that there are no conflicts with object pointers). Used in ASSERTs. 46 // that there are no conflicts with object pointers). Used in ASSERTs.
47 static bool CodeIsPatchable(const Code& code); 47 static bool CodeIsPatchable(const Code& code);
48 48
49 // Return the target address of the static call before return_address 49 // Return the target address of the static call before return_address
50 // in given code. 50 // in given code.
51 static uword GetStaticCallTargetAt(uword return_address, const Code& code); 51 static uword GetStaticCallTargetAt(uword return_address, const Code& code);
52 52
53 // Get instance call information. Returns the call target and sets each 53 // Get instance call information. Returns the call target and sets each
54 // of the output parameters ic_data and arguments_descriptor if they are 54 // of the output parameters ic_data and arguments_descriptor if they are
55 // non-NULL. 55 // non-NULL.
(...skipping 15 matching lines...) Expand all
71 static intptr_t InstanceCallSizeInBytes(); 71 static intptr_t InstanceCallSizeInBytes();
72 72
73 static void InsertCallAt(uword start, uword target); 73 static void InsertCallAt(uword start, uword target);
74 74
75 static RawObject* GetEdgeCounterAt(uword pc, const Code& code); 75 static RawObject* GetEdgeCounterAt(uword pc, const Code& code);
76 }; 76 };
77 77
78 } // namespace dart 78 } // namespace dart
79 79
80 #endif // VM_CODE_PATCHER_H_ 80 #endif // VM_CODE_PATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698