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

Issue 8352039: Cleanup ScopeInfo and SerializedScopeInfo. (Closed)

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

Description

Cleanup ScopeInfo and SerializedScopeInfo. Both classes have been merged into a single ScopeInfo class that implements the functionality from both. This CL does not adapt the broken gdb-jit interface. Committed: http://code.google.com/p/v8/source/detail?r=9868

Patch Set 1 #

Patch Set 2 : Rebased to include harmony const CL. #

Patch Set 3 : Rebased to include removal of stack height tracking and strict mode flag changes. #

Total comments: 35

Patch Set 4 : Addressed comments. #

Total comments: 3

Patch Set 5 : Converted ScopeInfo accessors to CamelCase. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+599 lines, -729 lines) Patch
M src/accessors.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M src/compiler.cc View 1 6 chunks +6 lines, -8 lines 0 comments Download
M src/contexts.cc View 1 2 3 4 chunks +7 lines, -10 lines 0 comments Download
M src/factory.h View 1 3 chunks +3 lines, -3 lines 0 comments Download
M src/factory.cc View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/frames.cc View 1 2 3 4 6 chunks +15 lines, -16 lines 2 comments Download
M src/full-codegen.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M src/gdb-jit.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/heap.h View 1 3 chunks +3 lines, -3 lines 0 comments Download
M src/heap.cc View 1 2 3 4 chunks +7 lines, -8 lines 0 comments Download
M src/hydrogen.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/liveedit.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/objects.h View 1 2 3 4 6 chunks +140 lines, -18 lines 0 comments Download
M src/objects-inl.h View 1 2 3 3 chunks +6 lines, -6 lines 0 comments Download
M src/parser.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/profile-generator.cc View 1 2 3 4 1 chunk +19 lines, -12 lines 0 comments Download
M src/runtime.cc View 1 2 3 4 30 chunks +73 lines, -87 lines 0 comments Download
M src/scopeinfo.h View 1 chunk +0 lines, -61 lines 0 comments Download
M src/scopeinfo.cc View 1 2 3 4 3 chunks +265 lines, -423 lines 0 comments Download
M src/scopes.h View 1 2 3 5 chunks +7 lines, -10 lines 0 comments Download
M src/scopes.cc View 1 2 3 12 chunks +30 lines, -45 lines 0 comments Download
M src/serialize.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/v8globals.h View 1 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Steven
PTAL.
9 years, 2 months ago (2011-10-20 08:38:03 UTC) #1
Kevin Millikin (Chromium)
My comments are mainly about the style of objects.h and about the use of handles ...
9 years, 1 month ago (2011-11-02 16:31:19 UTC) #2
Steven
http://codereview.chromium.org/8352039/diff/8001/src/heap.cc File src/heap.cc (right): http://codereview.chromium.org/8352039/diff/8001/src/heap.cc#newcode4417 src/heap.cc:4417: maybe_result->ToObject(&result); Removed the second ToObject call. However I kept ...
9 years, 1 month ago (2011-11-02 18:52:59 UTC) #3
Kevin Millikin (Chromium)
LGTM with a few small comments. http://codereview.chromium.org/8352039/diff/8001/src/heap.cc File src/heap.cc (right): http://codereview.chromium.org/8352039/diff/8001/src/heap.cc#newcode4417 src/heap.cc:4417: maybe_result->ToObject(&result); I see ...
9 years, 1 month ago (2011-11-03 09:18:37 UTC) #4
Steven
9 years, 1 month ago (2011-11-03 10:32:34 UTC) #5
http://codereview.chromium.org/8352039/diff/8001/src/heap.cc
File src/heap.cc (right):

http://codereview.chromium.org/8352039/diff/8001/src/heap.cc#newcode4417
src/heap.cc:4417: maybe_result->ToObject(&result);
Ok I'm convinced. Done.
On 2011/11/03 09:18:37, Kevin Millikin wrote:
> I see what you mean, that's less useful in raw allocation functions.  Still,
> nothing needs specifically a ScopeInfo*:
> 
> FixedArray* scope_info;
> MaybeObject* maybe_scope_info = AllocateFixedArray(length, TENURED);
> if (!maybe_scope_info->To(&scope_info)) return maybe_scope_info;
> scope_info->set_map(scope_info_map());
> return scope_info;

http://codereview.chromium.org/8352039/diff/13001/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/8352039/diff/13001/src/runtime.cc#newcode10795
src/runtime.cc:10795: String* name = scope_info->LocalName(i);
On 2011/11/03 09:18:37, Kevin Millikin wrote:
> On 2011/11/02 18:52:59, Steven wrote:
> > Shall I keep the handle here, to be consistent in handlified code?
> 
> I think so, even though it allocates a handle per loop iteration.

Done.

http://codereview.chromium.org/8352039/diff/9027/src/frames.cc
File src/frames.cc (right):

http://codereview.chromium.org/8352039/diff/9027/src/frames.cc#newcode1045
src/frames.cc:1045: if (i < scope_info->NumParameters()) {
Yeah we talked about this earlier. Also renamed the other functions.
On 2011/11/03 09:18:38, Kevin Millikin wrote:
> OK, but "Num" grinds on me in identifier names, because it reads badly. 
> ParameterCount is only one character longer.

Powered by Google App Engine
This is Rietveld 408576698