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

Issue 10784014: Removed transitions from the accessor pair descriptors. (Closed)

Created:
8 years, 5 months ago by Toon Verwaest
Modified:
8 years, 5 months ago
Reviewers:
Sven Panne
CC:
v8-dev
Visibility:
Public.

Description

Removed transitions from the accessor pair descriptors. AccessorPair related transitions are now also stored as single map links, simplifying the code that handles transitions. AccessorPairs can now be shared between descriptor arrays, since they can only be mutated after another transition anyway; during which the pair is copied before writing. Committed: https://code.google.com/p/v8/source/detail?r=12097

Patch Set 1 #

Total comments: 14

Patch Set 2 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -470 lines) Patch
M src/bootstrapper.cc View 1 chunk +1 line, -3 lines 0 comments Download
M src/factory.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/heap.h View 1 chunk +0 lines, -4 lines 0 comments Download
M src/heap.cc View 1 chunk +2 lines, -30 lines 0 comments Download
M src/ic.cc View 4 chunks +4 lines, -15 lines 0 comments Download
M src/mark-compact.cc View 2 chunks +1 line, -24 lines 0 comments Download
M src/objects.h View 3 chunks +8 lines, -16 lines 0 comments Download
M src/objects.cc View 1 28 chunks +145 lines, -293 lines 0 comments Download
M src/objects-debug.cc View 1 chunk +1 line, -9 lines 0 comments Download
M src/objects-inl.h View 1 chunk +6 lines, -5 lines 0 comments Download
M src/property.h View 1 4 chunks +7 lines, -17 lines 0 comments Download
M src/runtime.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/transitions.h View 4 chunks +10 lines, -11 lines 0 comments Download
M src/transitions.cc View 6 chunks +12 lines, -13 lines 0 comments Download
M src/transitions-inl.h View 2 chunks +10 lines, -26 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Toon Verwaest
PTAL. The main parts of the change are JSObject::DefineFastAccessor, NewCallbackTransition and TryAccessorTransition. Most of the ...
8 years, 5 months ago (2012-07-16 13:13:41 UTC) #1
Sven Panne
8 years, 5 months ago (2012-07-16 13:49:43 UTC) #2
LGTM with some minor nits...

http://codereview.chromium.org/10784014/diff/1/src/objects.cc
File src/objects.cc (right):

http://codereview.chromium.org/10784014/diff/1/src/objects.cc#newcode4368
src/objects.cc:4368: MaybeObject* maybe_accessors = CreateAccessorPairFor(name);
Using a local scope makes it very clear that maybe_accessors is only used for
testing/conversion immediately afterwards. It is a common v8 idiom (a.k.a. Maybe
monad ;-), so I would prefer to leave the scope as it is.

http://codereview.chromium.org/10784014/diff/1/src/objects.cc#newcode4442
src/objects.cc:4442: MaybeObject* maybe_ok =
NormalizeProperties(CLEAR_INOBJECT_PROPERTIES, 0);
See above.

http://codereview.chromium.org/10784014/diff/1/src/objects.cc#newcode4449
src/objects.cc:4449: MaybeObject* maybe_new_map = map()->CopyDropDescriptors();
See above.

http://codereview.chromium.org/10784014/diff/1/src/objects.cc#newcode4461
src/objects.cc:4461: maybe_ok = SetNormalizedProperty(name, structure, details);
See above.

http://codereview.chromium.org/10784014/diff/1/src/objects.cc#newcode4615
src/objects.cc:4615: MaybeObject* maybe_accessors;
Scope again...

http://codereview.chromium.org/10784014/diff/1/src/objects.cc#newcode4962
src/objects.cc:4962: // Attention, tricky index manipulation ahead: Two
consecutive indices are
Does this comment still hold?

http://codereview.chromium.org/10784014/diff/1/src/objects.cc#newcode5760
src/objects.cc:5760: MaybeObject* maybe_result = descriptor->KeyToSymbol();
Scope...

http://codereview.chromium.org/10784014/diff/1/src/objects.cc#newcode5772
src/objects.cc:5772: MaybeObject* maybe_result = descriptor->KeyToSymbol();
Scope...

http://codereview.chromium.org/10784014/diff/1/src/objects.cc#newcode5781
src/objects.cc:5781: MaybeObject* maybe_descriptors = Allocate(new_size,
MAY_BE_SHARED);
Scope...

http://codereview.chromium.org/10784014/diff/1/src/objects.cc#newcode5814
src/objects.cc:5814: MaybeObject* maybe_result = Allocate(number_of_descriptors,
shared_mode);
Scope...

http://codereview.chromium.org/10784014/diff/1/src/objects.cc#newcode5924
src/objects.cc:5924: MaybeObject* maybe_copy = heap->AllocateAccessorPair();
Scope...

http://codereview.chromium.org/10784014/diff/1/src/objects.cc#newcode12564
src/objects.cc:12564: MaybeObject* maybe_key =
heap->LookupSymbol(String::cast(k));
Scope...

http://codereview.chromium.org/10784014/diff/1/src/objects.cc#newcode12607
src/objects.cc:12607: MaybeObject* maybe_new_map =
obj->map()->CopyReplaceDescriptors(descriptors);
Scope...

http://codereview.chromium.org/10784014/diff/1/src/property.h
File src/property.h (right):

http://codereview.chromium.org/10784014/diff/1/src/property.h#newcode363
src/property.h:363: return GetValue();
Can we put an ASSERT here about the lookup_type_?

Powered by Google App Engine
This is Rietveld 408576698