Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 49fd9d4816af83fbc6d364f872e83ca8ca2f7a3b..1867787888bbc75c9b867b8191a0f6e57923a8fe 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -4591,6 +4591,24 @@ bool Code::IsWeakObjectInOptimizedCode(Object* object) { |
} |
+class Code::FindAndReplacePattern { |
+ public: |
+ FindAndReplacePattern() : count_(0) { } |
+ void Add(Handle<Map> map_to_find, Handle<Object> obj_to_replace) { |
+ ASSERT(count_ < kMaxCount); |
+ find_[count_] = map_to_find; |
+ replace_[count_] = obj_to_replace; |
+ ++count_; |
+ } |
+ private: |
+ static const int kMaxCount = 4; |
+ int count_; |
+ Handle<Map> find_[kMaxCount]; |
+ Handle<Object> replace_[kMaxCount]; |
+ friend class Code; |
+}; |
+ |
+ |
Object* Map::prototype() { |
return READ_FIELD(this, kPrototypeOffset); |
} |