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

Unified Diff: src/objects.h

Issue 250913003: Dictionary::SetEntry() and Dictionary::AddEntry() 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 | « src/elements.cc ('k') | 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 36fd831b273e4cfedd7de25b16b682004b350b0f..f8b9ad1e9a92f4209e0d72674db29dc7b4669327 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -3836,7 +3836,7 @@ class HashTable: public FixedArray {
}
// Attempt to shrink hash table after removal of key.
- static Handle<Derived> Shrink(Handle<Derived> table, Key key);
+ MUST_USE_RESULT static Handle<Derived> Shrink(Handle<Derived> table, Key key);
// Ensure enough space for n additional elements.
MUST_USE_RESULT static Handle<Derived> EnsureCapacity(
@@ -4012,7 +4012,9 @@ class Dictionary: public HashTable<Derived, Shape, Key> {
JSObject::DeleteMode mode);
// Attempt to shrink the dictionary after deletion of key.
- static inline Handle<Derived> Shrink(Handle<Derived> dictionary, Key key) {
+ MUST_USE_RESULT static inline Handle<Derived> Shrink(
+ Handle<Derived> dictionary,
+ Key key) {
return DerivedHashTable::Shrink(dictionary, key);
}
@@ -4061,11 +4063,11 @@ class Dictionary: public HashTable<Derived, Shape, Key> {
// Sets the entry to (key, value) pair.
inline void SetEntry(int entry,
- Object* key,
- Object* value);
+ Handle<Object> key,
+ Handle<Object> value);
inline void SetEntry(int entry,
- Object* key,
- Object* value,
+ Handle<Object> key,
+ Handle<Object> value,
PropertyDetails details);
MUST_USE_RESULT static Handle<Derived> Add(
@@ -4082,11 +4084,7 @@ class Dictionary: public HashTable<Derived, Shape, Key> {
Handle<Object> value);
// Add entry to dictionary.
- MUST_USE_RESULT MaybeObject* AddEntry(Key key,
- Object* value,
- PropertyDetails details,
- uint32_t hash);
- MUST_USE_RESULT static Handle<Derived> AddEntry(
+ static void AddEntry(
Handle<Derived> dictionary,
Key key,
Handle<Object> value,
@@ -4279,7 +4277,8 @@ class ObjectHashTableShape : public BaseShape<Object*> {
class ObjectHashTable: public HashTable<ObjectHashTable,
ObjectHashTableShape,
Object*> {
- typedef HashTable<ObjectHashTable, ObjectHashTableShape, Object*> HashTable_;
+ typedef HashTable<
+ ObjectHashTable, ObjectHashTableShape, Object*> DerivedHashTable;
public:
static inline ObjectHashTable* cast(Object* obj) {
ASSERT(obj->IsHashTable());
@@ -4287,8 +4286,9 @@ class ObjectHashTable: public HashTable<ObjectHashTable,
}
// Attempt to shrink hash table after removal of key.
- static inline Handle<ObjectHashTable> Shrink(Handle<ObjectHashTable> table,
- Handle<Object> key);
+ MUST_USE_RESULT static inline Handle<ObjectHashTable> Shrink(
+ Handle<ObjectHashTable> table,
+ Handle<Object> key);
// Looks up the value associated with the given key. The hole value is
// returned in case the key is not present.
« no previous file with comments | « src/elements.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698