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

Issue 8983034: Getting value of local variables on stack trace (Closed)

Created:
8 years, 11 months ago by hausner
Modified:
8 years, 11 months ago
Reviewers:
siva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Getting value of local variables on stack trace Introduce concept of scope in local variable info, according to mirror proposal. Committed: https://code.google.com/p/dart/source/detail?r=3017

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -47 lines) Patch
M runtime/vm/compiler.cc View 1 1 chunk +14 lines, -0 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 1 chunk +9 lines, -13 lines 0 comments Download
M runtime/vm/debugger.h View 1 1 chunk +0 lines, -4 lines 0 comments Download
M runtime/vm/debugger.cc View 1 2 chunks +4 lines, -9 lines 0 comments Download
M runtime/vm/object.h View 1 1 chunk +5 lines, -2 lines 0 comments Download
M runtime/vm/object.cc View 1 3 chunks +13 lines, -8 lines 0 comments Download
M runtime/vm/raw_object.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/scopes.cc View 1 1 chunk +12 lines, -10 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
hausner
8 years, 11 months ago (2012-01-04 23:14:35 UTC) #1
siva
LGTM with comment regarding scope_id http://codereview.chromium.org/8983034/diff/1/runtime/vm/scopes.cc File runtime/vm/scopes.cc (right): http://codereview.chromium.org/8983034/diff/1/runtime/vm/scopes.cc#newcode188 runtime/vm/scopes.cc:188: } This seems kind ...
8 years, 11 months ago (2012-01-05 02:01:45 UTC) #2
hausner
8 years, 11 months ago (2012-01-05 22:33:21 UTC) #3
Thank you for the review.

http://codereview.chromium.org/8983034/diff/1/runtime/vm/scopes.cc
File runtime/vm/scopes.cc (right):

http://codereview.chromium.org/8983034/diff/1/runtime/vm/scopes.cc#newcode188
runtime/vm/scopes.cc:188: }
On 2012/01/05 02:01:45, asiva wrote:
> This seems kind of fragile as it assumes that all the variables in a scope
will
> be consecutive in 'vars'.
> Why not add a scope_id field to LocalScope and assign a scope_id value when a
> new LocalScope is created. 

True. CollectLocalVariables() function below makes sure that all variables of a
scope are consecutive in the vars array. Added a comment to describe this.

The nice thing about this solution (rather than generating scope ids globally)
is that the parameters are always in scope 0. Also, we don't have to maintain a
global id counter (or add one to the isolate).

Powered by Google App Engine
This is Rietveld 408576698