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

Side by Side Diff: runtime/vm/code_patcher_arm.cc

Issue 829133006: VM: Small generated code size improvements on x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 months 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 9
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
11 #include "vm/instructions.h" 11 #include "vm/instructions.h"
12 #include "vm/object.h" 12 #include "vm/object.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 RawArray* CodePatcher::GetClosureArgDescAt(uword return_address,
17 const Code& code) {
18 ASSERT(code.ContainsInstructionAt(return_address));
19 CallPattern call(return_address, code);
20 return call.ClosureArgumentsDescriptor();
21 }
22
23
24 uword CodePatcher::GetStaticCallTargetAt(uword return_address, 16 uword CodePatcher::GetStaticCallTargetAt(uword return_address,
25 const Code& code) { 17 const Code& code) {
26 ASSERT(code.ContainsInstructionAt(return_address)); 18 ASSERT(code.ContainsInstructionAt(return_address));
27 CallPattern call(return_address, code); 19 CallPattern call(return_address, code);
28 return call.TargetAddress(); 20 return call.TargetAddress();
29 } 21 }
30 22
31 23
32 void CodePatcher::PatchStaticCallAt(uword return_address, 24 void CodePatcher::PatchStaticCallAt(uword return_address,
33 const Code& code, 25 const Code& code,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 126
135 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { 127 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) {
136 ASSERT(code.ContainsInstructionAt(pc)); 128 ASSERT(code.ContainsInstructionAt(pc));
137 EdgeCounter counter(pc, code); 129 EdgeCounter counter(pc, code);
138 return counter.edge_counter(); 130 return counter.edge_counter();
139 } 131 }
140 132
141 } // namespace dart 133 } // namespace dart
142 134
143 #endif // defined TARGET_ARCH_ARM 135 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698