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

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

Issue 11411072: Simplify CodePatcher::GetStaticCallAt. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/code_patcher_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25 matching lines...) Expand all
36 static void RestoreEntry(const Code& code); 36 static void RestoreEntry(const Code& code);
37 37
38 // Returns true if the code can be patched with a jump at beginnning (checks 38 // Returns true if the code can be patched with a jump at beginnning (checks
39 // that there are no conflicts with object pointers). Used in ASSERTs. 39 // that there are no conflicts with object pointers). Used in ASSERTs.
40 static bool CodeIsPatchable(const Code& code); 40 static bool CodeIsPatchable(const Code& code);
41 41
42 // Returns true if the code before return_address is a static 42 // Returns true if the code before return_address is a static
43 // or dynamic Dart call. 43 // or dynamic Dart call.
44 static bool IsDartCall(uword return_address); 44 static bool IsDartCall(uword return_address);
45 45
46 // Get static call information. 46 static uword GetStaticCallTargetAt(uword return_address);
47 static void GetStaticCallAt(uword return_address,
48 Function* function,
49 uword* target);
50 47
51 // Get instance call information. 48 // Get instance call information.
52 static void GetInstanceCallAt(uword return_address, 49 static void GetInstanceCallAt(uword return_address,
53 String* function_name, 50 String* function_name,
54 int* num_arguments, 51 int* num_arguments,
55 int* num_named_arguments, 52 int* num_named_arguments,
56 uword* target); 53 uword* target);
57 54
58 static RawICData* GetInstanceCallIcDataAt(uword return_address); 55 static RawICData* GetInstanceCallIcDataAt(uword return_address);
59 56
60 static intptr_t InstanceCallSizeInBytes(); 57 static intptr_t InstanceCallSizeInBytes();
61 58
62 static void InsertCallAt(uword start, uword target); 59 static void InsertCallAt(uword start, uword target);
63 }; 60 };
64 61
65 } // namespace dart 62 } // namespace dart
66 63
67 #endif // VM_CODE_PATCHER_H_ 64 #endif // VM_CODE_PATCHER_H_
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/code_patcher_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698