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

Issue 10640012: Add a second kind of HandleScope that ties the lifetime of Handles created in its scope to the life… (Closed)

Created:
8 years, 6 months ago by sanjoy
Modified:
8 years, 5 months ago
Reviewers:
Erik Corry, danno
CC:
v8-dev
Visibility:
Public.

Description

Add a second kind of HandleScope that ties the lifetime of Handles created in its scope to the lifetime of a given CompilationInfo. BUG= TEST= Committed: https://code.google.com/p/v8/source/detail?r=11939

Patch Set 1 : #

Total comments: 12

Patch Set 2 : Address review. #

Total comments: 11

Patch Set 3 : Danno's review. #

Patch Set 4 : Cleanup. #

Total comments: 14

Patch Set 5 : Fix nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+238 lines, -5 lines) Patch
M src/api.h View 1 2 3 6 chunks +35 lines, -1 line 0 comments Download
M src/api.cc View 1 2 3 4 3 chunks +94 lines, -1 line 0 comments Download
M src/compiler.h View 1 2 3 4 4 chunks +26 lines, -0 lines 0 comments Download
M src/compiler.cc View 1 2 3 chunks +11 lines, -3 lines 0 comments Download
M src/handles.h View 1 2 3 4 2 chunks +30 lines, -0 lines 0 comments Download
M src/handles.cc View 1 2 3 4 1 chunk +41 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
sanjoy
8 years, 6 months ago (2012-06-22 08:20:46 UTC) #1
Erik Corry
I'm not happy with having references to compilation in the api.h since this stuff is ...
8 years, 6 months ago (2012-06-22 09:39:56 UTC) #2
sanjoy
> I'm not happy with having references to compilation in the api.h since this > ...
8 years, 6 months ago (2012-06-22 10:04:17 UTC) #3
sanjoy
> _while_ we're creating Handles inside a GatheringHandleScope (which > doesn't happens on the mutator ...
8 years, 6 months ago (2012-06-22 10:05:22 UTC) #4
Erik Corry
I am worried that we could accidentally dereference the handles from the other thread and ...
8 years, 6 months ago (2012-06-22 11:08:36 UTC) #5
Erik Corry
On 2012/06/22 10:04:17, sanjoy wrote: > I think this approach does allow multiple threads of ...
8 years, 6 months ago (2012-06-22 11:09:21 UTC) #6
sanjoy
> I am worried that we could accidentally dereference the handles from the other > ...
8 years, 6 months ago (2012-06-22 11:26:59 UTC) #7
Erik Corry
On 2012/06/22 11:26:59, sanjoy wrote: > The plan is to first _allow_ dereferencing Handles from ...
8 years, 6 months ago (2012-06-22 11:37:51 UTC) #8
sanjoy
> Risky plan, because what can you do with the object once you have got ...
8 years, 6 months ago (2012-06-22 11:44:36 UTC) #9
sanjoy
http://codereview.chromium.org/10640012/diff/2001/src/api.cc File src/api.cc (right): http://codereview.chromium.org/10640012/diff/2001/src/api.cc#newcode6376 src/api.cc:6376: template<bool HasCompilationBlock> On 2012/06/22 11:08:36, Erik Corry wrote: > ...
8 years, 6 months ago (2012-06-22 20:08:10 UTC) #10
danno
Sorry for the long DBC, but I some substantial feedback. I think the plumbing here ...
8 years, 6 months ago (2012-06-24 11:07:03 UTC) #11
sanjoy
In this patch, the HandleScopeImplementer creates a DeferredHandleScope, which has a 'Detach()' method that returns ...
8 years, 6 months ago (2012-06-25 14:09:31 UTC) #12
sanjoy
8 years, 6 months ago (2012-06-27 10:03:06 UTC) #13
Erik Corry
LGTM http://codereview.chromium.org/10640012/diff/27001/src/api.cc File src/api.cc (right): http://codereview.chromium.org/10640012/diff/27001/src/api.cc#newcode6409 src/api.cc:6409: for (DeferredHandles* deferred = deferred_handles_head_; deferred; Please put ...
8 years, 6 months ago (2012-06-27 10:28:15 UTC) #14
sanjoy
8 years, 6 months ago (2012-06-27 11:17:09 UTC) #15
Will land after running tests in debug mode.

http://codereview.chromium.org/10640012/diff/27001/src/api.cc
File src/api.cc (right):

http://codereview.chromium.org/10640012/diff/27001/src/api.cc#newcode6409
src/api.cc:6409: for (DeferredHandles* deferred = deferred_handles_head_;
deferred;
On 2012/06/27 10:28:15, Erik Corry wrote:
> Please put the parts of a for loop either all on one line or on 3 lines, not 2
> and 1.  Also we don't allow implicit boolean conversions so you have to
compare
> with NULL.

Fixed.

http://codereview.chromium.org/10640012/diff/27001/src/api.cc#newcode6450
src/api.cc:6450: ASSERT(last_handle_before_deferred_block_);
On 2012/06/27 10:28:15, Erik Corry wrote:
> No implicit boolean conversions.

Fixed.

http://codereview.chromium.org/10640012/diff/27001/src/handles.cc
File src/handles.cc (right):

http://codereview.chromium.org/10640012/diff/27001/src/handles.cc#newcode980
src/handles.cc:980: 
On 2012/06/27 10:28:15, Erik Corry wrote:
> Missing newline.

Fixed.

http://codereview.chromium.org/10640012/diff/27001/src/handles.cc#newcode1001
src/handles.cc:1001:
CompilationHandleScope::CompilationHandleScope(CompilationInfo* info)
On 2012/06/27 10:28:15, Erik Corry wrote:
> This should also go somewhere else (perhaps inlined in the class declaration).

Moved to compiler.h

http://codereview.chromium.org/10640012/diff/27001/src/handles.h
File src/handles.h (right):

http://codereview.chromium.org/10640012/diff/27001/src/handles.h#newcode176
src/handles.h:176: // alive till as long as the DeferredHandles object is alive.
On 2012/06/27 10:28:15, Erik Corry wrote:
> till as long as -> as long as

Fixed.

http://codereview.chromium.org/10640012/diff/27001/src/handles.h#newcode194
src/handles.h:194: class CompilationInfo;
On 2012/06/27 10:28:15, Erik Corry wrote:
> This declaration and the CompilationHandleScope are uses of handles and not
part
> of the handles interface, so they should go somewhere else, like perhaps
> hydrogen.h

Moved to compiler.h.

http://codereview.chromium.org/10640012/diff/27001/src/handles.h#newcode197
src/handles.h:197: // A wrapper around a CompilationInfo that Detaches the
Handles from
On 2012/06/27 10:28:15, Erik Corry wrote:
> Detaches -> detaches

Fixed.

Powered by Google App Engine
This is Rietveld 408576698