From d90860b42feda2f63f417f94b3d7dd4da3ad41fa Mon Sep 17 00:00:00 2001 From: "svenpanne@chromium.org" Date: Tue, 10 Jan 2012 16:12:24 +0000 Subject: [PATCH] Changes after code review# git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/factory.h | 1 + src/heap.h | 4 ++-- src/objects.cc | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/factory.h b/src/factory.h index bacc687..3431136 100644 --- a/src/factory.h +++ b/src/factory.h @@ -69,6 +69,7 @@ class Factory { Handle NewDeoptimizationOutputData( int deopt_entry_count, PretenureFlag pretenure); + // Allocates a pre-tenured empty AccessorPair. Handle NewAccessorPair(); Handle LookupSymbol(Vector str); diff --git a/src/heap.h b/src/heap.h index 16561a0..a04c6df 100644 --- a/src/heap.h +++ b/src/heap.h @@ -615,8 +615,8 @@ class Heap { // Allocates an empty PolymorphicCodeCache. MUST_USE_RESULT MaybeObject* AllocatePolymorphicCodeCache(); - // Allocates an empty AccessorPair. - MaybeObject* AllocateAccessorPair(); + // Allocates a pre-tenured empty AccessorPair. + MUST_USE_RESULT MaybeObject* AllocateAccessorPair(); // Clear the Instanceof cache (used when a prototype changes). inline void ClearInstanceofCache(); diff --git a/src/objects.cc b/src/objects.cc index 3041e5a..f893966 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -4733,7 +4733,7 @@ Object* JSObject::LookupAccessor(String* name, bool is_getter) { PropertyDetails details = dictionary->DetailsAt(entry); if (details.type() == CALLBACKS) { if (element->IsAccessorPair()) { - AccessorPair *accessors = AccessorPair::cast(element); + AccessorPair* accessors = AccessorPair::cast(element); return is_getter ? accessors->getter() : accessors->setter(); } } @@ -4751,7 +4751,7 @@ Object* JSObject::LookupAccessor(String* name, bool is_getter) { if (result.type() == CALLBACKS) { Object* obj = result.GetCallbackObject(); if (obj->IsAccessorPair()) { - AccessorPair *accessors = AccessorPair::cast(obj); + AccessorPair* accessors = AccessorPair::cast(obj); return is_getter ? accessors->getter() : accessors->setter(); } } -- 2.7.4