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

Side by Side Diff: runtime/vm/instructions_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/instructions_dbc.h ('k') | runtime/vm/instructions_mips.h » ('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/instructions.h" 8 #include "vm/instructions.h"
9 #include "vm/instructions_dbc.h" 9 #include "vm/instructions_dbc.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 ic_data_(ICData::Handle()) { 60 ic_data_(ICData::Handle()) {
61 ASSERT(code.ContainsInstructionAt(end_)); 61 ASSERT(code.ContainsInstructionAt(end_));
62 const uword call_pc = end_ - sizeof(Instr); 62 const uword call_pc = end_ - sizeof(Instr);
63 Instr call_instr = Bytecode::At(call_pc); 63 Instr call_instr = Bytecode::At(call_pc);
64 ASSERT(Bytecode::IsCallOpcode(call_instr)); 64 ASSERT(Bytecode::IsCallOpcode(call_instr));
65 ic_data_load_end_ = call_pc; 65 ic_data_load_end_ = call_pc;
66 target_code_pool_index_ = Bytecode::DecodeD(call_instr); 66 target_code_pool_index_ = Bytecode::DecodeD(call_instr);
67 } 67 }
68 68
69 69
70 int CallPattern::DeoptCallPatternLengthInInstructions() {
71 UNIMPLEMENTED();
72 return 0;
73 }
74
75
76 int CallPattern::DeoptCallPatternLengthInBytes() {
77 UNIMPLEMENTED();
78 return 0;
79 }
80
81
82 NativeCallPattern::NativeCallPattern(uword pc, const Code& code) 70 NativeCallPattern::NativeCallPattern(uword pc, const Code& code)
83 : object_pool_(ObjectPool::Handle(code.GetObjectPool())), 71 : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
84 end_(pc), 72 end_(pc),
85 native_function_pool_index_(-1), 73 native_function_pool_index_(-1),
86 target_code_pool_index_(-1) { 74 target_code_pool_index_(-1) {
87 UNIMPLEMENTED(); 75 UNIMPLEMENTED();
88 } 76 }
89 77
90 78
91 RawCode* NativeCallPattern::target() const { 79 RawCode* NativeCallPattern::target() const {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 return reinterpret_cast<RawCode*>( 162 return reinterpret_cast<RawCode*>(
175 object_pool_.ObjectAt(target_code_pool_index_)); 163 object_pool_.ObjectAt(target_code_pool_index_));
176 } 164 }
177 165
178 166
179 void CallPattern::SetTargetCode(const Code& target_code) const { 167 void CallPattern::SetTargetCode(const Code& target_code) const {
180 object_pool_.SetObjectAt(target_code_pool_index_, target_code); 168 object_pool_.SetObjectAt(target_code_pool_index_, target_code);
181 } 169 }
182 170
183 171
184 void CallPattern::InsertDeoptCallAt(uword pc, uword target_address) { 172 void CallPattern::InsertDeoptCallAt(uword pc) {
185 const uint8_t argc = Bytecode::IsCallOpcode(Bytecode::At(pc)) ? 173 const uint8_t argc = Bytecode::IsCallOpcode(Bytecode::At(pc)) ?
186 Bytecode::DecodeArgc(Bytecode::At(pc)) : 0; 174 Bytecode::DecodeArgc(Bytecode::At(pc)) : 0;
187 *reinterpret_cast<Instr*>(pc) = Bytecode::Encode(Bytecode::kDeopt, argc, 0); 175 *reinterpret_cast<Instr*>(pc) = Bytecode::Encode(Bytecode::kDeopt, argc, 0);
188 } 176 }
189 177
190 178
191 SwitchableCallPattern::SwitchableCallPattern(uword pc, const Code& code) 179 SwitchableCallPattern::SwitchableCallPattern(uword pc, const Code& code)
192 : object_pool_(ObjectPool::Handle(code.GetObjectPool())), 180 : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
193 data_pool_index_(-1), 181 data_pool_index_(-1),
194 target_pool_index_(-1) { 182 target_pool_index_(-1) {
(...skipping 30 matching lines...) Expand all
225 213
226 214
227 bool ReturnPattern::IsValid() const { 215 bool ReturnPattern::IsValid() const {
228 UNIMPLEMENTED(); 216 UNIMPLEMENTED();
229 return false; 217 return false;
230 } 218 }
231 219
232 } // namespace dart 220 } // namespace dart
233 221
234 #endif // defined TARGET_ARCH_DBC 222 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/instructions_dbc.h ('k') | runtime/vm/instructions_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698