Index: src/codegen.h |
diff --git a/src/codegen.h b/src/codegen.h |
index 1e87a1b9e7654feddd63ab869ad43a055733b609..65f1a6dcd66a7049725e362bc7a2ae785140ab84 100644 |
--- a/src/codegen.h |
+++ b/src/codegen.h |
@@ -120,6 +120,22 @@ class ElementsTransitionGenerator : public AllStatic { |
static const int kNumberDictionaryProbes = 4; |
+class NoCodeAgeSequence { |
+ public: |
+ NoCodeAgeSequence(); |
+ |
+ uint32_t length() const { return sequence_.length(); } |
+ bool Match(byte* candidate) const { |
Sven Panne
2014/05/05 07:54:14
"IsPrefixOf" describes the intent more closely.
mvstanton
2014/05/06 09:55:45
I ended up generalizing the class, and the notion
|
+ return memcmp(candidate, sequence_.start(), sequence_.length()) == 0; |
+ } |
+ void CopyTo(byte* new_buffer) const { |
+ CopyBytes(new_buffer, sequence_.start(), sequence_.length()); |
+ } |
+ |
+ protected: |
+ const EmbeddedVector<byte, kNoCodeAgeSequenceLength> sequence_; |
+}; |
+ |
} } // namespace v8::internal |
#endif // V8_CODEGEN_H_ |