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

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: Created 5 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/scanner-character-streams.h
diff --git a/src/scanner-character-streams.h b/src/scanner-character-streams.h
index 5944d7644572320f33498082ca362d0cdb2df564..68fb0a076069459a2e2ebe2ebe0cc73687441350 100644
--- a/src/scanner-character-streams.h
+++ b/src/scanner-character-streams.h
@@ -43,12 +43,17 @@ class GenericStringUtf16CharacterStream: public BufferedUtf16CharacterStream {
size_t end_position);
virtual ~GenericStringUtf16CharacterStream();
+ virtual bool SetBookmark();
+ virtual bool CanResetToBookmark();
+ virtual bool ResetToBookmark();
+
protected:
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 +134,10 @@ class ExternalTwoByteStringUtf16CharacterStream: public Utf16CharacterStream {
pos_--;
}
+ virtual bool SetBookmark();
+ virtual bool CanResetToBookmark();
+ virtual bool ResetToBookmark();
+
protected:
virtual size_t SlowSeekForward(size_t delta) {
// Fast case always handles seeking.
@@ -140,6 +149,9 @@ class ExternalTwoByteStringUtf16CharacterStream: public Utf16CharacterStream {
}
Handle<ExternalTwoByteString> source_;
const uc16* raw_data_; // Pointer to the actual array of characters.
+
+ private:
+ int bookmark_;
};
} } // namespace v8::internal
« src/scanner.cc ('K') | « src/scanner.cc ('k') | src/scanner-character-streams.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698