*Shape::AsObject() are no longer used - removed.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/256773002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20986 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
ishell@chromium.org 2014-04-25 13:50:19 +00:00
parent c27da0c9b2
commit dc1fe284b7
2 changed files with 31 additions and 37 deletions

View File

@ -475,6 +475,27 @@ Handle<Object> HashTableKey::AsHandle(Isolate* isolate) {
}
Handle<Object> StringTableShape::AsHandle(Isolate* isolate, HashTableKey* key) {
return key->AsHandle(isolate);
}
Handle<Object> MapCacheShape::AsHandle(Isolate* isolate, HashTableKey* key) {
return key->AsHandle(isolate);
}
Handle<Object> CompilationCacheShape::AsHandle(Isolate* isolate,
HashTableKey* key) {
return key->AsHandle(isolate);
}
Handle<Object> CodeCacheHashTableShape::AsHandle(Isolate* isolate,
HashTableKey* key) {
return key->AsHandle(isolate);
}
template <typename Char>
class SequentialStringKey : public HashTableKey {
public:
@ -6626,10 +6647,12 @@ uint32_t UnseededNumberDictionaryShape::HashForObject(uint32_t key,
return ComputeIntegerHash(static_cast<uint32_t>(other->Number()), 0);
}
uint32_t SeededNumberDictionaryShape::SeededHash(uint32_t key, uint32_t seed) {
return ComputeIntegerHash(key, seed);
}
uint32_t SeededNumberDictionaryShape::SeededHashForObject(uint32_t key,
uint32_t seed,
Object* other) {
@ -6637,9 +6660,6 @@ uint32_t SeededNumberDictionaryShape::SeededHashForObject(uint32_t key,
return ComputeIntegerHash(static_cast<uint32_t>(other->Number()), seed);
}
MaybeObject* NumberDictionaryShape::AsObject(Heap* heap, uint32_t key) {
return heap->NumberFromUint32(key);
}
Handle<Object> NumberDictionaryShape::AsHandle(Isolate* isolate, uint32_t key) {
return isolate->factory()->NewNumberFromUint(key);
@ -6664,12 +6684,6 @@ uint32_t NameDictionaryShape::HashForObject(Handle<Name> key, Object* other) {
}
MaybeObject* NameDictionaryShape::AsObject(Heap* heap, Handle<Name> key) {
ASSERT(key->IsUniqueName());
return *key;
}
Handle<Object> NameDictionaryShape::AsHandle(Isolate* isolate,
Handle<Name> key) {
ASSERT(key->IsUniqueName());
@ -6699,11 +6713,6 @@ uint32_t ObjectHashTableShape::HashForObject(Handle<Object> key,
}
MaybeObject* ObjectHashTableShape::AsObject(Heap* heap, Handle<Object> key) {
return *key;
}
Handle<Object> ObjectHashTableShape::AsHandle(Isolate* isolate,
Handle<Object> key) {
return key;

View File

@ -3866,16 +3866,16 @@ class StringTableShape : public BaseShape<HashTableKey*> {
static inline bool IsMatch(HashTableKey* key, Object* value) {
return key->IsMatch(value);
}
static inline uint32_t Hash(HashTableKey* key) {
return key->Hash();
}
static inline uint32_t HashForObject(HashTableKey* key, Object* object) {
return key->HashForObject(object);
}
MUST_USE_RESULT static inline MaybeObject* AsObject(Heap* heap,
HashTableKey* key) {
return key->AsObject(heap);
}
static inline Handle<Object> AsHandle(Isolate* isolate, HashTableKey* key);
static const int kPrefixSize = 0;
static const int kEntrySize = 1;
@ -3919,6 +3919,7 @@ class MapCacheShape : public BaseShape<HashTableKey*> {
static inline bool IsMatch(HashTableKey* key, Object* value) {
return key->IsMatch(value);
}
static inline uint32_t Hash(HashTableKey* key) {
return key->Hash();
}
@ -3927,10 +3928,7 @@ class MapCacheShape : public BaseShape<HashTableKey*> {
return key->HashForObject(object);
}
MUST_USE_RESULT static inline MaybeObject* AsObject(Heap* heap,
HashTableKey* key) {
return key->AsObject(heap);
}
static inline Handle<Object> AsHandle(Isolate* isolate, HashTableKey* key);
static const int kPrefixSize = 0;
static const int kEntrySize = 2;
@ -4087,8 +4085,6 @@ class NameDictionaryShape : public BaseShape<Handle<Name> > {
static inline bool IsMatch(Handle<Name> key, Object* other);
static inline uint32_t Hash(Handle<Name> key);
static inline uint32_t HashForObject(Handle<Name> key, Object* object);
MUST_USE_RESULT static inline MaybeObject* AsObject(Heap* heap,
Handle<Name> key);
static inline Handle<Object> AsHandle(Isolate* isolate, Handle<Name> key);
static const int kPrefixSize = 2;
static const int kEntrySize = 3;
@ -4125,9 +4121,6 @@ class NameDictionary: public Dictionary<NameDictionary,
class NumberDictionaryShape : public BaseShape<uint32_t> {
public:
static inline bool IsMatch(uint32_t key, Object* other);
// TODO(ishell): This should be eventually replaced with AsHandle().
MUST_USE_RESULT static inline MaybeObject* AsObject(Heap* heap,
uint32_t key);
static inline Handle<Object> AsHandle(Isolate* isolate, uint32_t key);
static const int kEntrySize = 3;
static const bool kIsEnumerable = false;
@ -4240,8 +4233,6 @@ class ObjectHashTableShape : public BaseShape<Handle<Object> > {
static inline bool IsMatch(Handle<Object> key, Object* other);
static inline uint32_t Hash(Handle<Object> key);
static inline uint32_t HashForObject(Handle<Object> key, Object* object);
MUST_USE_RESULT static inline MaybeObject* AsObject(Heap* heap,
Handle<Object> key);
static inline Handle<Object> AsHandle(Isolate* isolate, Handle<Object> key);
static const int kPrefixSize = 0;
static const int kEntrySize = 2;
@ -8280,10 +8271,7 @@ class CompilationCacheShape : public BaseShape<HashTableKey*> {
return key->HashForObject(object);
}
MUST_USE_RESULT static MaybeObject* AsObject(Heap* heap,
HashTableKey* key) {
return key->AsObject(heap);
}
static inline Handle<Object> AsHandle(Isolate* isolate, HashTableKey* key);
static const int kPrefixSize = 0;
static const int kEntrySize = 2;
@ -8383,10 +8371,7 @@ class CodeCacheHashTableShape : public BaseShape<HashTableKey*> {
return key->HashForObject(object);
}
MUST_USE_RESULT static MaybeObject* AsObject(Heap* heap,
HashTableKey* key) {
return key->AsObject(heap);
}
static inline Handle<Object> AsHandle(Isolate* isolate, HashTableKey* key);
static const int kPrefixSize = 0;
static const int kEntrySize = 2;