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

Unified Diff: src/vector.h

Issue 316173002: Handle "//# sourceURL" comments in the Parser instead of the JS. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: yet another trivial rebase Created 6 years, 6 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') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/vector.h
diff --git a/src/vector.h b/src/vector.h
index 505ef5ad5619bea29f48a6d03b7437169f2fafb1..8e56393f250ac138f35bd708f2b8492f576d9a2c 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -100,6 +100,17 @@ class Vector {
input.length() * sizeof(S) / sizeof(T));
}
+ bool operator==(const Vector<T>& other) const {
+ if (length_ != other.length_) return false;
+ if (start_ == other.start_) return true;
+ for (int i = 0; i < length_; ++i) {
+ if (start_[i] != other.start_[i]) {
+ return false;
+ }
+ }
+ return true;
+ }
+
protected:
void set_start(T* start) { start_ = start; }
« no previous file with comments | « src/scanner.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698