Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: src/codegen.h

Issue 261953002: Fix for 3303 MultithreadedParallelIsolates has a race condition. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698