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

Issue 7527001: Encapsulate element handling into a class keyed on ElementsKind (Closed)

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

Description

Encapsulate element handling into a class keyed on ElementsKind Advantage is that it's much easier to add new element types (like FAST_SMI_ELEMENTS), and that handling logic for each element kind is (more) consolidated. Currently, only GetElementsWithReceiver uses the new encapsulation, but the goal is to move much more element functionality into the class incrementally. BUG=none TEST=none Committed: http://code.google.com/p/v8/source/detail?r=8810

Patch Set 1 #

Patch Set 2 : add missing files #

Patch Set 3 : Full implementation #

Patch Set 4 : Finish GetElementWithReceiver implementation #

Patch Set 5 : tweak includes #

Patch Set 6 : merge with top-of-tree #

Patch Set 7 : performance fixes #

Total comments: 12

Patch Set 8 : review feedback #

Patch Set 9 : fix nits #

Total comments: 35

Patch Set 10 : review feedback #

Patch Set 11 : fix indentation nits #

Patch Set 12 : fix spacing again #

Patch Set 13 : merge with tot #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+500 lines, -307 lines) Patch
M src/SConscript View 1 chunk +1 line, -0 lines 0 comments Download
A src/elements.h View 1 2 3 4 5 6 7 8 9 1 chunk +62 lines, -0 lines 0 comments Download
A src/elements.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +279 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 18 chunks +41 lines, -28 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +24 lines, -252 lines 1 comment Download
M src/objects-debug.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +70 lines, -10 lines 0 comments Download
M src/objects-printer.cc View 1 2 3 4 5 5 chunks +10 lines, -10 lines 0 comments Download
M src/runtime.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +4 lines, -4 lines 0 comments Download
M src/v8.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M test/cctest/test-api.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M tools/gyp/v8.gyp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
danno
Please take a look.
9 years, 4 months ago (2011-07-29 11:10:40 UTC) #1
danno
adding kevin
9 years, 4 months ago (2011-07-29 12:21:12 UTC) #2
Jakob Kummerow
Drive-by nits :-) For the high-level evaluation of this approach, I defer to others with ...
9 years, 4 months ago (2011-07-30 10:29:21 UTC) #3
danno
feedback address. http://codereview.chromium.org/7527001/diff/12001/src/elements.cc File src/elements.cc (right): http://codereview.chromium.org/7527001/diff/12001/src/elements.cc#newcode45 src/elements.cc:45: // public ElementsHandlerImpl<SomeElementsHandlerImpl> { On 2011/07/30 10:29:21, ...
9 years, 4 months ago (2011-07-30 13:10:10 UTC) #4
Rico
LGTM, I like the approach, although it is quite different from what we do elsewhere ...
9 years, 4 months ago (2011-08-01 07:33:27 UTC) #5
Rico
9 years, 4 months ago (2011-08-01 07:33:40 UTC) #6
Lasse Reichstein
http://codereview.chromium.org/7527001/diff/15002/src/elements.cc File src/elements.cc (right): http://codereview.chromium.org/7527001/diff/15002/src/elements.cc#newcode44 src/elements.cc:44: // class SomeElementsHandlerImpl : I really, really dislike adding ...
9 years, 4 months ago (2011-08-01 09:35:54 UTC) #7
Kevin Millikin (Chromium)
My high level comment is the same as Lasse's: I think there is one too ...
9 years, 4 months ago (2011-08-01 10:18:23 UTC) #8
Lasse Reichstein
http://codereview.chromium.org/7527001/diff/15002/src/elements.h File src/elements.h (right): http://codereview.chromium.org/7527001/diff/15002/src/elements.h#newcode48 src/elements.h:48: inline static ElementsHandler* ForKind(JSObject::ElementsKind elements_kind) { We should probably ...
9 years, 4 months ago (2011-08-01 10:47:13 UTC) #9
Lasse Reichstein
http://codereview.chromium.org/7527001/diff/15002/src/objects.h File src/objects.h (right): http://codereview.chromium.org/7527001/diff/15002/src/objects.h#newcode74 src/objects.h:74: // - FixedArray I suddently remembered that this documentation ...
9 years, 4 months ago (2011-08-02 12:23:46 UTC) #10
danno
please take another look http://codereview.chromium.org/7527001/diff/15002/src/elements.cc File src/elements.cc (right): http://codereview.chromium.org/7527001/diff/15002/src/elements.cc#newcode44 src/elements.cc:44: // class SomeElementsHandlerImpl : On ...
9 years, 4 months ago (2011-08-02 13:37:46 UTC) #11
Lasse Reichstein
Point-comment only. I haven't checked the code yet, only read the responses (but those seem ...
9 years, 4 months ago (2011-08-02 13:59:58 UTC) #12
Lasse Reichstein
9 years, 4 months ago (2011-08-03 10:35:38 UTC) #13
LGTM

http://codereview.chromium.org/7527001/diff/25004/src/objects.cc
File src/objects.cc (right):

http://codereview.chromium.org/7527001/diff/25004/src/objects.cc#newcode11868
src/objects.cc:11868: // Single beak point.
Spotted a missing "r" in "break" here :)

Powered by Google App Engine
This is Rietveld 408576698