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

Unified Diff: src/vector.h

Issue 641283003: Support lazy parsing of inner functions (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: Track variable declarations in the preparser Created 6 years, 1 month 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/vector.h
diff --git a/src/vector.h b/src/vector.h
index a4fdb1060efa195056e5c9c6e7df11065c4e584a..39fcc83c95c466c0ba1cdc13801c38bc0c3ec05b 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -91,10 +91,17 @@ class Vector {
}
inline Vector<T> operator+(int offset) {
- DCHECK(offset < length_);
+ DCHECK(offset <= length_);
return Vector<T>(start_ + offset, length_ - offset);
}
+ inline Vector<T>& operator+=(int offset) {
+ DCHECK(offset <= length_);
+ start_ += offset;
+ length_ -= offset;
+ return *this;
+ }
+
// Factory method for creating empty vectors.
static Vector<T> empty() { return Vector<T>(NULL, 0); }
« src/preparser.cc ('K') | « src/preparser.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698