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

Issue 8344046: Reapply r9673 "Scope tree serialization and ScopeIterator cleanup." (Closed)

Created:
9 years, 2 months ago by Steven
Modified:
9 years, 2 months ago
CC:
v8-dev
Visibility:
Public.

Description

Reapply r9673 "Scope tree serialization and ScopeIterator cleanup." This also includes the two fixes from r9674 and r9675. Here's the diff to the previous CL. --- a/src/runtime.cc +++ b/src/runtime.cc @@ -11133,17 +11133,26 @@ class ScopeIterator { context_(Context::cast(frame->context())), nested_scope_chain_(4) { + // Catch the case when the debugger stops in an internal function. + Handle<SharedFunctionInfo> shared_info(function_->shared()); + if (shared_info->script() == isolate->heap()->undefined_value()) { + if (shared_info->scope_info()->HasContext()) Next(); + return; + } + // Check whether we are in global code or function code. If there is a stack // slot for .result then this function has been created for evaluating // global code and it is not a real function. // Checking for the existence of .result seems fragile, but the scope info // saved with the code object does not otherwise have that information. - int index = function_->shared()->scope_info()-> + int index = shared_info->scope_info()-> StackSlotIndex(isolate_->heap()->result_symbol()); // Reparse the code and analyze the scopes. ZoneScope zone_scope(isolate, DELETE_ON_EXIT); - Handle<SharedFunctionInfo> shared_info(function_->shared()); Handle<Script> script(Script::cast(shared_info->script())); Scope* scope; if (index >= 0) { Committed: http://code.google.com/p/v8/source/detail?r=9734

Patch Set 1 #

Patch Set 2 : Skip nested contexts of an internal function. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+538 lines, -182 lines) Patch
M src/ast.h View 3 chunks +2 lines, -6 lines 0 comments Download
M src/ast-inl.h View 1 chunk +10 lines, -0 lines 0 comments Download
M src/contexts.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/objects.h View 2 chunks +6 lines, -0 lines 0 comments Download
M src/parser.h View 1 chunk +1 line, -1 line 0 comments Download
M src/parser.cc View 23 chunks +37 lines, -32 lines 0 comments Download
M src/runtime.cc View 1 8 chunks +158 lines, -85 lines 0 comments Download
M src/scopeinfo.h View 3 chunks +5 lines, -10 lines 0 comments Download
M src/scopeinfo.cc View 13 chunks +47 lines, -20 lines 0 comments Download
M src/scopes.h View 10 chunks +53 lines, -14 lines 0 comments Download
M src/scopes.cc View 6 chunks +31 lines, -11 lines 0 comments Download
M src/v8globals.h View 1 chunk +10 lines, -0 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 chunk +132 lines, -0 lines 0 comments Download
M test/mjsunit/debug-scopes.js View 4 chunks +44 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Steven
PTAL. Will also run WebKit tests over night.
9 years, 2 months ago (2011-10-19 15:56:55 UTC) #1
Steven
Did a small change in skipping (nested) contexts in an internal function.
9 years, 2 months ago (2011-10-20 08:11:54 UTC) #2
Kevin Millikin (Chromium)
9 years, 2 months ago (2011-10-21 10:15:44 UTC) #3
This LGTM.

Powered by Google App Engine
This is Rietveld 408576698