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

Unified Diff: src/smart-pointers.h

Issue 10701054: Enable stub generation using Hydrogen/Lithium (again) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: First pass at pre-VFP2 RA Created 8 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/smart-pointers.h
diff --git a/src/smart-pointers.h b/src/smart-pointers.h
index 345c4d47fb73e8d3e0c10c7f80fc87530876dbb3..fea4595ac71705f3e8a05d6ac58837d926fe60eb 100644
--- a/src/smart-pointers.h
+++ b/src/smart-pointers.h
@@ -63,6 +63,11 @@ class SmartPointerBase {
return p_[i];
}
+ // You can use [n] to index as if it was a plain pointer
+ const inline T& operator[](size_t i) const {
+ return p_[i];
+ }
+
// We don't have implicit conversion to a T* since that hinders migration:
// You would not be able to change a method from returning a T* to
// returning an SmartArrayPointer<T> and then get errors wherever it is used.

Powered by Google App Engine
This is Rietveld 408576698