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

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

Issue 12260026: Add support for object pool (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/disassembler_test.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) 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/deopt_instructions.h" 5 #include "vm/deopt_instructions.h"
6 6
7 #include "vm/assembler_macros.h" 7 #include "vm/assembler_macros.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/locations.h" 10 #include "vm/locations.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 Code::Handle(deopt_context->isolate(), function.unoptimized_code()); 262 Code::Handle(deopt_context->isolate(), function.unoptimized_code());
263 uword continue_at_pc = code.GetDeoptBeforePcAtDeoptId(deopt_id_); 263 uword continue_at_pc = code.GetDeoptBeforePcAtDeoptId(deopt_id_);
264 intptr_t* to_addr = deopt_context->GetToFrameAddressAt(to_index); 264 intptr_t* to_addr = deopt_context->GetToFrameAddressAt(to_index);
265 *to_addr = continue_at_pc; 265 *to_addr = continue_at_pc;
266 266
267 uword pc = code.GetPcForDeoptId(deopt_id_, PcDescriptors::kIcCall); 267 uword pc = code.GetPcForDeoptId(deopt_id_, PcDescriptors::kIcCall);
268 if (pc != 0) { 268 if (pc != 0) {
269 // If the deoptimization happened at an IC call, update the IC data 269 // If the deoptimization happened at an IC call, update the IC data
270 // to avoid repeated deoptimization at the same site next time around. 270 // to avoid repeated deoptimization at the same site next time around.
271 ICData& ic_data = ICData::Handle(); 271 ICData& ic_data = ICData::Handle();
272 CodePatcher::GetInstanceCallAt(pc, &ic_data, NULL); 272 CodePatcher::GetInstanceCallAt(pc, code, &ic_data, NULL);
273 if (!ic_data.IsNull()) { 273 if (!ic_data.IsNull()) {
274 ic_data.set_deopt_reason(deopt_context->deopt_reason()); 274 ic_data.set_deopt_reason(deopt_context->deopt_reason());
275 } 275 }
276 } 276 }
277 } 277 }
278 278
279 private: 279 private:
280 static const intptr_t kFieldWidth = kBitsPerWord / 2; 280 static const intptr_t kFieldWidth = kBitsPerWord / 2;
281 class ObjectTableIndex : public BitField<intptr_t, 0, kFieldWidth> { }; 281 class ObjectTableIndex : public BitField<intptr_t, 0, kFieldWidth> { };
282 class DeoptId : public BitField<intptr_t, kFieldWidth, kFieldWidth> { }; 282 class DeoptId : public BitField<intptr_t, kFieldWidth, kFieldWidth> { };
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 Smi* offset, 816 Smi* offset,
817 DeoptInfo* info, 817 DeoptInfo* info,
818 Smi* reason) { 818 Smi* reason) {
819 intptr_t i = index * kEntrySize; 819 intptr_t i = index * kEntrySize;
820 *offset ^= table.At(i); 820 *offset ^= table.At(i);
821 *info ^= table.At(i + 1); 821 *info ^= table.At(i + 1);
822 *reason ^= table.At(i + 2); 822 *reason ^= table.At(i + 2);
823 } 823 }
824 824
825 } // namespace dart 825 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/disassembler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698