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

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

Issue 2392613002: Reapply "Lazy deopt without code patching." (Closed)
Patch Set: . Created 4 years, 2 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
« no previous file with comments | « runtime/vm/code_patcher_arm64.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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_DBC. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC.
6 #if defined(TARGET_ARCH_DBC) 6 #if defined(TARGET_ARCH_DBC)
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"
(...skipping 12 matching lines...) Expand all
23 23
24 void CodePatcher::PatchStaticCallAt(uword return_address, 24 void CodePatcher::PatchStaticCallAt(uword return_address,
25 const Code& code, 25 const Code& code,
26 const Code& new_target) { 26 const Code& new_target) {
27 ASSERT(code.ContainsInstructionAt(return_address)); 27 ASSERT(code.ContainsInstructionAt(return_address));
28 CallPattern call(return_address, code); 28 CallPattern call(return_address, code);
29 call.SetTargetCode(new_target); 29 call.SetTargetCode(new_target);
30 } 30 }
31 31
32 32
33 void CodePatcher::InsertDeoptimizationCallAt(uword start, uword target) { 33 void CodePatcher::InsertDeoptimizationCallAt(uword start) {
34 ASSERT(target == 0); // Always 0 on DBC. 34 CallPattern::InsertDeoptCallAt(start);
35 CallPattern::InsertDeoptCallAt(start, target);
36 } 35 }
37 36
38 37
39 RawCode* CodePatcher::GetInstanceCallAt(uword return_address, 38 RawCode* CodePatcher::GetInstanceCallAt(uword return_address,
40 const Code& code, 39 const Code& code,
41 ICData* ic_data) { 40 ICData* ic_data) {
42 ASSERT(code.ContainsInstructionAt(return_address)); 41 ASSERT(code.ContainsInstructionAt(return_address));
43 CallPattern call(return_address, code); 42 CallPattern call(return_address, code);
44 if (ic_data != NULL) { 43 if (ic_data != NULL) {
45 *ic_data = call.IcData(); 44 *ic_data = call.IcData();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 NativeFunction* target) { 109 NativeFunction* target) {
111 ASSERT(code.ContainsInstructionAt(return_address)); 110 ASSERT(code.ContainsInstructionAt(return_address));
112 NativeCallPattern call(return_address, code); 111 NativeCallPattern call(return_address, code);
113 *target = call.native_function(); 112 *target = call.native_function();
114 return call.target(); 113 return call.target();
115 } 114 }
116 115
117 } // namespace dart 116 } // namespace dart
118 117
119 #endif // defined TARGET_ARCH_DBC 118 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/code_patcher_arm64.cc ('k') | runtime/vm/code_patcher_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698