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

Unified Diff: src/scanner-character-streams.h

Issue 1102523003: Implement a 'trial parse' step, that will abort pre-parsing excessively (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use a seperate 'hint' bit for "to be executed once" code aging. Created 5 years, 7 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
« no previous file with comments | « src/scanner.cc ('k') | src/scanner-character-streams.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner-character-streams.h
diff --git a/src/scanner-character-streams.h b/src/scanner-character-streams.h
index 5944d7644572320f33498082ca362d0cdb2df564..36d84bc0f6b5d82a16b005bef0ea737138642a1f 100644
--- a/src/scanner-character-streams.h
+++ b/src/scanner-character-streams.h
@@ -43,12 +43,18 @@ class GenericStringUtf16CharacterStream: public BufferedUtf16CharacterStream {
size_t end_position);
virtual ~GenericStringUtf16CharacterStream();
+ virtual bool SetBookmark();
+ virtual void ResetToBookmark();
+
protected:
+ static const size_t kNoBookmark = -1;
+
virtual size_t BufferSeekForward(size_t delta);
virtual size_t FillBuffer(size_t position);
Handle<String> string_;
size_t length_;
+ size_t bookmark_;
};
@@ -129,6 +135,9 @@ class ExternalTwoByteStringUtf16CharacterStream: public Utf16CharacterStream {
pos_--;
}
+ virtual bool SetBookmark();
+ virtual void ResetToBookmark();
+
protected:
virtual size_t SlowSeekForward(size_t delta) {
// Fast case always handles seeking.
@@ -140,6 +149,11 @@ class ExternalTwoByteStringUtf16CharacterStream: public Utf16CharacterStream {
}
Handle<ExternalTwoByteString> source_;
const uc16* raw_data_; // Pointer to the actual array of characters.
+
+ private:
+ static const size_t kNoBookmark = -1;
+
+ size_t bookmark_;
};
} } // namespace v8::internal
« no previous file with comments | « src/scanner.cc ('k') | src/scanner-character-streams.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698