Please take another look. Implemented the suggestion about the
UnwrapHandleList
and rebased.
http://codereview.chromium.org/8356041/diff/1/src/ic.cc
File src/ic.cc (right):
http://codereview.chromium.org/8356041/diff/1/src/ic.cc#newcode1492
src/ic.cc:1492: if (!receiver_maps->at(current).is_null() &&
On 2011/10/21 08:45:55, fschneider wrote:
On 2011/10/20 14:35:54, ulan wrote:
> Unfortunately, receiver_maps can contain nulls (see line 1667).
If we have to check for null-handles in a lot of places, I'd consider
removing
the debug-mode assert in the *-operator that checks for NULL. It does
not help
much in debugging IMO. What do you guys think?
I would also prefer to remove the assert. But I am not sure if there are
people relying on it.
http://codereview.chromium.org/8356041/diff/1/src/ic.cc#newcode1534
src/ic.cc:1534: return monomorphic_stub;
On 2011/10/21 06:48:13, Kevin Millikin wrote:
Could just be
return ComputeMonomorphicStub(...);
Done.
http://codereview.chromium.org/8356041/diff/1/src/list-inl.h
File src/list-inl.h (right):
http://codereview.chromium.org/8356041/diff/1/src/list-inl.h#newcode241
src/list-inl.h:241: List<T*>* UnwrapList(List<T*>* destination,
List<Handle<T> >* source) {
On 2011/10/21 06:48:13, Kevin Millikin wrote:
Maybe this name needs to be more obvious, like "UnwrapHandleList"....
You could avoid having to fill the destination with NULLs by doing:
ASSERT(destination.is_empty());
int length = source->length();
for (int i = 0; i < length; ++i) {
Handle<T> handle = source->at(i);
destination->Add(handle.is_null() ? NULL : *handle);
}
return destination;
Done.
http://codereview.chromium.org/8356041/diff/1/src/objects.cc
File src/objects.cc (right):
http://codereview.chromium.org/8356041/diff/1/src/objects.cc#newcode2199
src/objects.cc:2199: return (result == NULL) ? Handle<Map>() :
Handle<Map>(result);
On 2011/10/21 06:48:13, Kevin Millikin wrote:
Handle<Map>::null() a bit better than Handle<Map>().
Done.
http://codereview.chromium.org/8356041/diff/1/src/objects.cc#newcode2203
src/objects.cc:2203: Map* Map::FindTransitionedMap(MapList* candidates)
{
On 2011/10/21 06:48:13, Kevin Millikin wrote:
This is still needed by the raw pointer code? Will it be possible to
handlify
it directly at some point?
It is used in hydrogen code (HandlePolymorphicElementAccess), but it
shouldn't be difficult to replace raw pointer lists with handle lists. I
will do it in separate CL.
http://codereview.chromium.org/8356041/diff/1/src/objects.cc#newcode5160
src/objects.cc:5160: MaybeObject* PolymorphicCodeCache::Update(MapList*
maps,
On 2011/10/21 06:48:13, Kevin Millikin wrote:
Likewise, do you think it will be eventually possible to handlify the
PolymorphicCodeCache directly, or will we need to update it from raw
pointer
code?
ComputeStub seems to be the only user of the PolymorphicCodeCache, so it
should be possible to handlify.
http://codereview.chromium.org/8356041/diff/1/src/stub-cache.cc
File src/stub-cache.cc (right):
http://codereview.chromium.org/8356041/diff/1/src/stub-cache.cc#newcode537
src/stub-cache.cc:537: CALL_HEAP_FUNCTION(isolate(),
CompileLoadElement(*map), Code);
On 2011/10/21 06:48:13, Kevin Millikin wrote:
Remember that these need to reset the stub compiler's failure_ field.
Done.
http://codereview.chromium.org/8356041/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev