Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 75ff8393e06c3dcb02608c1e2c35ff1e39f00454..d9a90442f9ac733b22ae2a73e093463862efb76b 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); |
} |