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

Unified Diff: runtime/vm/parser.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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 8858)
+++ runtime/vm/parser.cc (working copy)
@@ -177,8 +177,8 @@
// variables, the context needs to be saved on entry and restored on exit.
// Add and allocate a local variable to this purpose.
if ((context_owner != NULL) && !function().IsClosureFunction()) {
- const String& context_var_name =
- String::ZoneHandle(String::NewSymbol(":saved_entry_context_var"));
+ const String& context_var_name = String::ZoneHandle(
+ String::NewSymbol(LocalVariable::kSavedContextVarName));
LocalVariable* context_var =
new LocalVariable(function().token_index(),
context_var_name,
@@ -3884,7 +3884,9 @@
SequenceNode* Parser::CloseBlock() {
SequenceNode* statements = current_block_->statements;
if (current_block_->scope != NULL) {
- // Record the end token index of the scope.
+ // Record the begin and end token index of the scope.
+ ASSERT(statements != NULL);
+ current_block_->scope->set_begin_token_index(statements->token_index());
current_block_->scope->set_end_token_index(token_index_);
}
current_block_ = current_block_->parent;

Powered by Google App Engine
This is Rietveld 408576698