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

Unified Diff: src/unicode.h

Issue 10872010: Reland regexp global optimizations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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/runtime.cc ('k') | src/unicode-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/unicode.h
diff --git a/src/unicode.h b/src/unicode.h
index 94ab1b4c1e7793cc1b0879e6906bb0b44851143c..91b16c9f3564f4f0fbb0846381ef02028b773f12 100644
--- a/src/unicode.h
+++ b/src/unicode.h
@@ -201,6 +201,7 @@ class CharacterStream {
protected:
virtual void FillBuffer() = 0;
+ virtual bool BoundsCheck(unsigned offset) = 0;
// The number of characters left in the current buffer
unsigned remaining_;
// The current offset within the buffer
@@ -228,6 +229,9 @@ class InputBuffer : public CharacterStream {
InputBuffer() { }
explicit InputBuffer(Input input) { Reset(input); }
virtual void FillBuffer();
+ virtual bool BoundsCheck(unsigned offset) {
+ return (buffer_ != util_buffer_) || (offset < kSize);
+ }
// A custom offset that can be used by the string implementation to
// mark progress within the encoded string.
« no previous file with comments | « src/runtime.cc ('k') | src/unicode-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698