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

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

Issue 10579020: Support captured variables in debugger (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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/code_generator_ia32.cc ('k') | runtime/vm/debugger.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 OS::Print("}\n"); 411 OS::Print("}\n");
412 OS::Print("Variable Descriptors for function '%s' {\n", 412 OS::Print("Variable Descriptors for function '%s' {\n",
413 function_fullname); 413 function_fullname);
414 const LocalVarDescriptors& var_descriptors = 414 const LocalVarDescriptors& var_descriptors =
415 LocalVarDescriptors::Handle(code.var_descriptors()); 415 LocalVarDescriptors::Handle(code.var_descriptors());
416 intptr_t var_desc_length = 416 intptr_t var_desc_length =
417 var_descriptors.IsNull() ? 0 : var_descriptors.Length(); 417 var_descriptors.IsNull() ? 0 : var_descriptors.Length();
418 String& var_name = String::Handle(); 418 String& var_name = String::Handle();
419 for (intptr_t i = 0; i < var_desc_length; i++) { 419 for (intptr_t i = 0; i < var_desc_length; i++) {
420 var_name = var_descriptors.GetName(i); 420 var_name = var_descriptors.GetName(i);
421 intptr_t scope_id, begin_pos, end_pos; 421 RawLocalVarDescriptors::VarInfo var_info;
422 var_descriptors.GetScopeInfo(i, &scope_id, &begin_pos, &end_pos); 422 var_descriptors.GetInfo(i, &var_info);
423 intptr_t slot = var_descriptors.GetSlotIndex(i); 423 if (var_info.kind == RawLocalVarDescriptors::kContextLevel) {
424 OS::Print(" var %s scope %ld (valid %d-%d) offset %ld\n", 424 OS::Print(" context level %d scope %d (valid %d-%d)\n",
425 var_name.ToCString(), scope_id, begin_pos, end_pos, slot); 425 var_info.index,
426 var_info.scope_id,
427 var_info.begin_pos,
428 var_info.end_pos);
429 } else if (var_info.kind == RawLocalVarDescriptors::kContextChain) {
430 OS::Print(" saved CTX reg offset %d\n", var_info.index);
431 } else if (var_info.kind == RawLocalVarDescriptors::kStackVar) {
432 OS::Print(" stack var '%s' offset %d (valid %d-%d) \n",
433 var_name.ToCString(),
434 var_info.index,
435 var_info.begin_pos,
436 var_info.end_pos);
437 } else if (var_info.kind == RawLocalVarDescriptors::kContextVar) {
438 OS::Print(" context var '%s' level %d offset %d (valid %d-%d)\n",
439 var_name.ToCString(),
440 var_info.scope_id,
441 var_info.index,
442 var_info.begin_pos,
443 var_info.end_pos);
444 }
426 } 445 }
427 OS::Print("}\n"); 446 OS::Print("}\n");
428 OS::Print("Exception Handlers for function '%s' {\n", function_fullname); 447 OS::Print("Exception Handlers for function '%s' {\n", function_fullname);
429 const ExceptionHandlers& handlers = 448 const ExceptionHandlers& handlers =
430 ExceptionHandlers::Handle(code.exception_handlers()); 449 ExceptionHandlers::Handle(code.exception_handlers());
431 OS::Print("%s", handlers.ToCString()); 450 OS::Print("%s", handlers.ToCString());
432 OS::Print("}\n"); 451 OS::Print("}\n");
433 } 452 }
434 isolate->set_long_jump_base(base); 453 isolate->set_long_jump_base(base);
435 return Error::null(); 454 return Error::null();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 isolate->object_store()->clear_sticky_error(); 572 isolate->object_store()->clear_sticky_error();
554 isolate->set_long_jump_base(base); 573 isolate->set_long_jump_base(base);
555 return result.raw(); 574 return result.raw();
556 } 575 }
557 UNREACHABLE(); 576 UNREACHABLE();
558 return Object::null(); 577 return Object::null();
559 } 578 }
560 579
561 580
562 } // namespace dart 581 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator_ia32.cc ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698