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

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

Issue 163433003: Handle contexts which have been optimized out. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« runtime/vm/debugger.cc ('K') | « runtime/vm/debugger.cc ('k') | no next file » | 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.h" 7 #include "vm/assembler.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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 RawArray* DeoptContext::DestFrameAsArray() { 360 RawArray* DeoptContext::DestFrameAsArray() {
361 ASSERT(dest_frame_ != NULL && dest_frame_is_allocated_); 361 ASSERT(dest_frame_ != NULL && dest_frame_is_allocated_);
362 const Array& dest_array = 362 const Array& dest_array =
363 Array::Handle(Array::New(dest_frame_size_)); 363 Array::Handle(Array::New(dest_frame_size_));
364 Object& obj = Object::Handle(); 364 Object& obj = Object::Handle();
365 for (intptr_t i = 0; i < dest_frame_size_; i++) { 365 for (intptr_t i = 0; i < dest_frame_size_; i++) {
366 obj = reinterpret_cast<RawObject*>(dest_frame_[i]); 366 obj = reinterpret_cast<RawObject*>(dest_frame_[i]);
367 ASSERT(obj.IsNull() || 367 ASSERT(obj.IsNull() ||
368 obj.IsInstance() || 368 obj.IsInstance() ||
369 obj.IsContext() || 369 obj.IsContext() ||
370 obj.IsTypeArguments()); 370 obj.IsTypeArguments() ||
371 obj.IsClass() ||
372 obj.IsField());
turnidge 2014/02/13 18:55:49 ...or I could just eliminate this ASSERT entirely.
siva 2014/02/13 22:58:40 Under what circumstances can we expect to see a Cl
turnidge 2014/02/14 16:36:27 I don't know why this happened yet. I was hoping
371 dest_array.SetAt(i, obj); 373 dest_array.SetAt(i, obj);
372 } 374 }
373 return dest_array.raw(); 375 return dest_array.raw();
374 } 376 }
375 377
376 378
377 // Deoptimization instruction moving value from optimized frame at 379 // Deoptimization instruction moving value from optimized frame at
378 // 'source_index' to specified slots in the unoptimized frame. 380 // 'source_index' to specified slots in the unoptimized frame.
379 // 'source_index' represents the slot index of the frame (0 being 381 // 'source_index' represents the slot index of the frame (0 being
380 // first argument) and accounts for saved return address, frame 382 // first argument) and accounts for saved return address, frame
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 Smi* offset, 1415 Smi* offset,
1414 DeoptInfo* info, 1416 DeoptInfo* info,
1415 Smi* reason) { 1417 Smi* reason) {
1416 intptr_t i = index * kEntrySize; 1418 intptr_t i = index * kEntrySize;
1417 *offset ^= table.At(i); 1419 *offset ^= table.At(i);
1418 *info ^= table.At(i + 1); 1420 *info ^= table.At(i + 1);
1419 *reason ^= table.At(i + 2); 1421 *reason ^= table.At(i + 2);
1420 } 1422 }
1421 1423
1422 } // namespace dart 1424 } // namespace dart
OLDNEW
« runtime/vm/debugger.cc ('K') | « runtime/vm/debugger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698