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

Unified Diff: src/objects.h

Issue 250013002: Dictionary::GenerateNewEnumerationIndices() and Dictionary::EnsureCapacity() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index ac8f7493bcb7afdfd91d46acc27105cd54d58bd9..f97805345a14a84b38da7db788ad1c942269c4b6 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4070,8 +4070,6 @@ class Dictionary: public HashTable<Derived, Shape, Key> {
PretenureFlag pretenure = NOT_TENURED);
// Ensure enough space for n additional elements.
- MUST_USE_RESULT MaybeObject* EnsureCapacity(int n, Key key);
-
static Handle<Derived> EnsureCapacity(Handle<Derived> obj, int n, Key key);
#ifdef OBJECT_PRINT
@@ -4115,7 +4113,7 @@ class Dictionary: public HashTable<Derived, Shape, Key> {
uint32_t hash);
// Generate new enumeration indices to avoid enumeration index overflow.
- MUST_USE_RESULT MaybeObject* GenerateNewEnumerationIndices();
+ static void GenerateNewEnumerationIndices(Handle<Derived> dictionary);
static const int kMaxNumberKeyIndex = DerivedHashTable::kPrefixStartIndex;
static const int kNextEnumerationIndexIndex = kMaxNumberKeyIndex + 1;
};
@@ -4138,6 +4136,8 @@ class NameDictionaryShape : public BaseShape<Name*> {
class NameDictionary: public Dictionary<NameDictionary,
NameDictionaryShape,
Name*> {
+ typedef Dictionary<
+ NameDictionary, NameDictionaryShape, Name*> DerivedDictionary;
public:
static inline NameDictionary* cast(Object* obj) {
ASSERT(obj->IsDictionary());
@@ -4146,7 +4146,7 @@ class NameDictionary: public Dictionary<NameDictionary,
// Copies enumerable keys to preallocated fixed array.
void CopyEnumKeysTo(FixedArray* storage);
- static void DoGenerateNewEnumerationIndices(
+ inline static void DoGenerateNewEnumerationIndices(
Handle<NameDictionary> dictionary);
// Find entry for key, otherwise return kNotFound. Optimized version of
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698