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

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

Issue 2382953004: Revert "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_arm.cc ('k') | runtime/vm/code_patcher_dbc.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/instructions.h" 10 #include "vm/instructions.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 void CodePatcher::PatchPoolPointerCallAt(uword return_address, 64 void CodePatcher::PatchPoolPointerCallAt(uword return_address,
65 const Code& code, 65 const Code& code,
66 const Code& new_target) { 66 const Code& new_target) {
67 ASSERT(code.ContainsInstructionAt(return_address)); 67 ASSERT(code.ContainsInstructionAt(return_address));
68 PoolPointerCall call(return_address, code); 68 PoolPointerCall call(return_address, code);
69 call.SetTarget(new_target); 69 call.SetTarget(new_target);
70 } 70 }
71 71
72 72
73 void CodePatcher::InsertDeoptimizationCallAt(uword start) { 73 void CodePatcher::InsertDeoptimizationCallAt(uword start, uword target) {
74 UNREACHABLE(); 74 // The inserted call should not overlap the lazy deopt jump code.
75 ASSERT(start + CallPattern::kDeoptCallLengthInBytes <= target);
76 CallPattern::InsertDeoptCallAt(start, target);
75 } 77 }
76 78
77 79
78 RawCode* CodePatcher::GetInstanceCallAt(uword return_address, 80 RawCode* CodePatcher::GetInstanceCallAt(uword return_address,
79 const Code& code, 81 const Code& code,
80 ICData* ic_data) { 82 ICData* ic_data) {
81 ASSERT(code.ContainsInstructionAt(return_address)); 83 ASSERT(code.ContainsInstructionAt(return_address));
82 CallPattern call(return_address, code); 84 CallPattern call(return_address, code);
83 if (ic_data != NULL) { 85 if (ic_data != NULL) {
84 *ic_data = call.IcData(); 86 *ic_data = call.IcData();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 NativeFunction* target) { 152 NativeFunction* target) {
151 ASSERT(code.ContainsInstructionAt(return_address)); 153 ASSERT(code.ContainsInstructionAt(return_address));
152 NativeCallPattern call(return_address, code); 154 NativeCallPattern call(return_address, code);
153 *target = call.native_function(); 155 *target = call.native_function();
154 return call.target(); 156 return call.target();
155 } 157 }
156 158
157 } // namespace dart 159 } // namespace dart
158 160
159 #endif // defined TARGET_ARCH_ARM64 161 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/code_patcher_arm.cc ('k') | runtime/vm/code_patcher_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698