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

Unified Diff: src/objects-inl.h

Issue 252383006: NameDictionary's key type is now Handle<Name> instead of Name*. (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/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index bc201320605a0349aa93ec489e1eb08df7be8a1b..741621e9982301a3a32f2de0c76968de65b98fc4 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -6648,7 +6648,7 @@ Handle<Object> NumberDictionaryShape::AsHandle(Isolate* isolate, uint32_t key) {
}
-bool NameDictionaryShape::IsMatch(Name* key, Object* other) {
+bool NameDictionaryShape::IsMatch(Handle<Name> key, Object* other) {
// We know that all entries in a hash table had their hash keys created.
// Use that knowledge to have fast failure.
if (key->Hash() != Name::cast(other)->Hash()) return false;
@@ -6656,26 +6656,26 @@ bool NameDictionaryShape::IsMatch(Name* key, Object* other) {
}
-uint32_t NameDictionaryShape::Hash(Name* key) {
+uint32_t NameDictionaryShape::Hash(Handle<Name> key) {
return key->Hash();
}
-uint32_t NameDictionaryShape::HashForObject(Name* key, Object* other) {
+uint32_t NameDictionaryShape::HashForObject(Handle<Name> key, Object* other) {
return Name::cast(other)->Hash();
}
-MaybeObject* NameDictionaryShape::AsObject(Heap* heap, Name* key) {
+MaybeObject* NameDictionaryShape::AsObject(Heap* heap, Handle<Name> key) {
ASSERT(key->IsUniqueName());
- return key;
+ return *key;
}
-Handle<Object> NameDictionaryShape::AsHandle(Isolate* isolate, Name* key) {
+Handle<Object> NameDictionaryShape::AsHandle(Isolate* isolate,
+ Handle<Name> key) {
ASSERT(key->IsUniqueName());
- // TODO(ishell): Convert Name* to Handle<Name> to avoid re-wrapping here.
- return handle(key, isolate);
+ return key;
}
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698