Reviewers: Mads Ager,

Description:
Add scope chain information to the debugger.

For each frame it is now possible to request information on the scope
chain. Each scope in the chain can have one of the types local, global,
with and closure. For scopes of type global and with the mirror for the
actual global or with object is available. For scopes of type local and
closure a plain JavaScript object with the materialized content of the
scope is created and its mirror is returned. Depending on the level of
possible optimization the content of the materialized local and closure
scopes might only contain the names which are actually used.

To iterate the scope chain an iterator ScopeIterator have been added
which can provide the type of each scope for each part of the chain.
This iterator creates an artificial local scope whenever that is present
as the context chain does not include the local scope.

To avoid caching the mirror objects for the materialized the local and
closure scopes transient mirrors have been added. They have negative
handles and cannot be retrieved by subsequent lookup calls. Their
content is part of a single response.

For debugging purposes an additional runtime function DebugPrintScopes
is been added.

Added commands 'scopes' and 'scope' to the developer shell and fixed the
dir command.

BUG=none
TEST=test/mjsunit/debug-scopes.js

Please review this at http://codereview.chromium.org/123021

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/d8.js
   M     src/debug-delay.js
   M     src/mirror-delay.js
   M     src/runtime.h
   M     src/runtime.cc
   A     test/mjsunit/debug-scopes.js



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to