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

Issue 9600013: Use an enum for indicating the component of an AccessorPair instead of a boolean flag. (Closed)

Created:
8 years, 9 months ago by Sven Panne
Modified:
8 years, 9 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

Use an enum for indicating the component of an AccessorPair instead of a boolean flag. In addition, this CL introduces a tiny new helper, which will come in handy later, plus some minor cleanup. Committed: https://code.google.com/p/v8/source/detail?r=10918

Patch Set 1 #

Total comments: 2

Patch Set 2 : Incorporated review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -32 lines) Patch
M src/objects.h View 1 4 chunks +19 lines, -7 lines 0 comments Download
M src/objects.cc View 14 chunks +18 lines, -22 lines 0 comments Download
M src/runtime.cc View 3 chunks +5 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Sven Panne
8 years, 9 months ago (2012-03-05 10:36:32 UTC) #1
Michael Starzinger
LGTM. https://chromiumcodereview.appspot.com/9600013/diff/1/src/objects.h File src/objects.h (right): https://chromiumcodereview.appspot.com/9600013/diff/1/src/objects.h#newcode7937 src/objects.h:7937: Object* get(AccessorComponent component) { If you plan on ...
8 years, 9 months ago (2012-03-05 11:56:30 UTC) #2
Sven Panne
8 years, 9 months ago (2012-03-05 12:08:51 UTC) #3
http://codereview.chromium.org/9600013/diff/1/src/objects.h
File src/objects.h (right):

http://codereview.chromium.org/9600013/diff/1/src/objects.h#newcode7937
src/objects.h:7937: Object* get(AccessorComponent component) {
On 2012/03/05 11:56:30, Michael Starzinger wrote:
> If you plan on extending AccessorComponent later (e.g. by ACCESSOR_NONE), it
> might be good to have the following assertion in these two functions. Your
call.
> 
> ASSERT(component == ACCESSOR_GETTER || component == ACCESSOR_SETTER);

Given C++'s lovely implicit conversions, I think the ASSERT here and in set
below are a good idea. Done.

Powered by Google App Engine
This is Rietveld 408576698