Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 94fd487aa3eef6f6016bcb153e4c69ba2e608273..b4087366ce3fca13ed90454522090bc15c3a0a33 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -9747,6 +9747,19 @@ void Code::FindAllCode(CodeHandleList* code_list, int length) { |
} |
+Name* Code::FindFirstName() { |
+ ASSERT(is_inline_cache_stub()); |
+ AssertNoAllocation no_allocation; |
+ int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
+ for (RelocIterator it(this, mask); !it.done(); it.next()) { |
+ RelocInfo* info = it.rinfo(); |
+ Object* object = info->target_object(); |
+ if (object->IsName()) return Name::cast(object); |
+ } |
+ return NULL; |
+} |
+ |
+ |
void Code::ClearInlineCaches() { |
int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET) | |
RelocInfo::ModeMask(RelocInfo::CONSTRUCT_CALL) | |