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

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

Issue 27054002: Add unit tests to cover stack inspect in the presence of closure calls (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/debugger_api_impl_test.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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 } 353 }
354 354
355 return deopt_arg_count; 355 return deopt_arg_count;
356 } 356 }
357 357
358 358
359 RawArray* DeoptContext::DestFrameAsArray() { 359 RawArray* DeoptContext::DestFrameAsArray() {
360 ASSERT(dest_frame_ != NULL && dest_frame_is_allocated_); 360 ASSERT(dest_frame_ != NULL && dest_frame_is_allocated_);
361 const Array& dest_array = 361 const Array& dest_array =
362 Array::Handle(Array::New(dest_frame_size_)); 362 Array::Handle(Array::New(dest_frame_size_));
363 Instance& obj = Instance::Handle(); 363 Object& obj = Object::Handle();
364 for (intptr_t i = 0; i < dest_frame_size_; i++) { 364 for (intptr_t i = 0; i < dest_frame_size_; i++) {
365 obj ^= reinterpret_cast<RawObject*>(dest_frame_[i]); 365 obj = reinterpret_cast<RawObject*>(dest_frame_[i]);
366 ASSERT(obj.IsNull() || obj.IsInstance() || obj.IsContext());
366 dest_array.SetAt(i, obj); 367 dest_array.SetAt(i, obj);
367 } 368 }
368 return dest_array.raw(); 369 return dest_array.raw();
369 } 370 }
370 371
371 372
372 // Deoptimization instruction moving value from optimized frame at 373 // Deoptimization instruction moving value from optimized frame at
373 // 'source_index' to specified slots in the unoptimized frame. 374 // 'source_index' to specified slots in the unoptimized frame.
374 // 'source_index' represents the slot index of the frame (0 being 375 // 'source_index' represents the slot index of the frame (0 being
375 // first argument) and accounts for saved return address, frame 376 // first argument) and accounts for saved return address, frame
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 Smi* offset, 1407 Smi* offset,
1407 DeoptInfo* info, 1408 DeoptInfo* info,
1408 Smi* reason) { 1409 Smi* reason) {
1409 intptr_t i = index * kEntrySize; 1410 intptr_t i = index * kEntrySize;
1410 *offset ^= table.At(i); 1411 *offset ^= table.At(i);
1411 *info ^= table.At(i + 1); 1412 *info ^= table.At(i + 1);
1412 *reason ^= table.At(i + 2); 1413 *reason ^= table.At(i + 2);
1413 } 1414 }
1414 1415
1415 } // namespace dart 1416 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger_api_impl_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698