Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 714eb4ec1870f4be1ec65f3a006cbccea8775554..1421126f017b558301f32b92a6bc5cc5fdaeb82f 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1493,6 +1493,16 @@ int DescriptorArray::Search(String* name) { |
} |
+int DescriptorArray::SearchWithCache(String* name) { |
+ int number = DescriptorLookupCache::Lookup(this, name); |
+ if (number == DescriptorLookupCache::kAbsent) { |
+ number = Search(name); |
+ DescriptorLookupCache::Update(this, name, number); |
+ } |
+ return number; |
+} |
+ |
+ |
String* DescriptorArray::GetKey(int descriptor_number) { |
ASSERT(descriptor_number < number_of_descriptors()); |
return String::cast(get(ToKeyIndex(descriptor_number))); |