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

Issue 10579020: Support captured variables in debugger (Closed)

Created:
8 years, 6 months ago by hausner
Modified:
8 years, 6 months ago
Reviewers:
regis
CC:
reviews_dartlang.org, devoncarew, keertip
Visibility:
Public.

Description

Support captured variables in debugger - Add context level ranges to LocalVarDescriptors - Add callee-saved context chain register to LocalVarDescriptors - Add context level and context offset of captured variables to LocalVarDescriptors - Add context chain to ActivationFrame - Add current context level to ActivationFrame Committed: https://code.google.com/p/dart/source/detail?r=8863

Patch Set 1 #

Patch Set 2 : #

Total comments: 10

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+362 lines, -143 lines) Patch
M runtime/vm/code_generator_ia32.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/compiler.cc View 1 1 chunk +24 lines, -5 lines 0 comments Download
M runtime/vm/debugger.h View 1 2 4 chunks +19 lines, -1 line 0 comments Download
M runtime/vm/debugger.cc View 1 7 chunks +189 lines, -59 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/object.h View 1 1 chunk +3 lines, -9 lines 0 comments Download
M runtime/vm/object.cc View 1 1 chunk +9 lines, -29 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 chunks +5 lines, -3 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 1 chunk +11 lines, -2 lines 0 comments Download
M runtime/vm/scopes.h View 1 5 chunks +19 lines, -6 lines 0 comments Download
M runtime/vm/scopes.cc View 1 2 4 chunks +79 lines, -27 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
hausner
8 years, 6 months ago (2012-06-19 17:36:13 UTC) #1
regis
LGTM http://codereview.chromium.org/10579020/diff/3003/runtime/vm/debugger.cc File runtime/vm/debugger.cc (right): http://codereview.chromium.org/10579020/diff/3003/runtime/vm/debugger.cc#newcode120 runtime/vm/debugger.cc:120: desc_indices_(8), We usually avoid setting an initial size. ...
8 years, 6 months ago (2012-06-19 18:14:41 UTC) #2
hausner
8 years, 6 months ago (2012-06-19 18:49:41 UTC) #3
Thank you.

http://codereview.chromium.org/10579020/diff/3003/runtime/vm/debugger.cc
File runtime/vm/debugger.cc (right):

http://codereview.chromium.org/10579020/diff/3003/runtime/vm/debugger.cc#newc...
runtime/vm/debugger.cc:120: desc_indices_(8),
On 2012/06/19 18:14:41, regis wrote:
> We usually avoid setting an initial size.

It avoids reallocating a couple of times in the very common case where there are
just a handful of local variables.

http://codereview.chromium.org/10579020/diff/3003/runtime/vm/debugger.cc#newc...
runtime/vm/debugger.cc:293: GrowableArray<String*> var_names(8);
On 2012/06/19 18:14:41, regis wrote:
> I think we usually avoid setting an initial size (8 here).
Same comment as above.

http://codereview.chromium.org/10579020/diff/3003/runtime/vm/debugger.h
File runtime/vm/debugger.h (right):

http://codereview.chromium.org/10579020/diff/3003/runtime/vm/debugger.h#newco...
runtime/vm/debugger.h:135: intptr_t ContextLevel();
On 2012/06/19 18:14:41, regis wrote:
> Add comment explaining what is the context level of an activation frame.
> I suppose it is the context level of the call that left this frame? 
Correct. Added the comment.

http://codereview.chromium.org/10579020/diff/3003/runtime/vm/raw_object.h
File runtime/vm/raw_object.h (right):

http://codereview.chromium.org/10579020/diff/3003/runtime/vm/raw_object.h#new...
runtime/vm/raw_object.h:806: static const int8_t kContextChain = 4;
On 2012/06/19 18:14:41, regis wrote:
> It should not be a problem to use an enum. See enum ClassState and the
> corresponding raw field class_state_ as an example.

Hmm. I started out with an enum and ran into some problem converting between the
enum type and int8_t. I converted to enum again and it's fine now. Strange. In
any case: done.

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

http://codereview.chromium.org/10579020/diff/3003/runtime/vm/scopes.cc#newcod...
runtime/vm/scopes.cc:224: (!parent()->HasContextLevel()) ||
On 2012/06/19 18:14:41, regis wrote:
> No indentation needed.

Ok. I try to indicate factors and terms by indentation. Removed.

Powered by Google App Engine
This is Rietveld 408576698