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

Unified Diff: src/utils.h

Issue 3421009: Revision 2.4.4.... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: '' Created 10 years, 3 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/unicode.h ('k') | src/version.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils.h
===================================================================
--- src/utils.h (revision 5457)
+++ src/utils.h (working copy)
@@ -391,6 +391,12 @@
// Factory method for creating empty vectors.
static Vector<T> empty() { return Vector<T>(NULL, 0); }
+ template<typename S>
+ static Vector<T> cast(Vector<S> input) {
+ return Vector<T>(reinterpret_cast<T*>(input.start()),
+ input.length() * sizeof(S) / sizeof(T));
+ }
+
protected:
void set_start(T* start) { start_ = start; }
« no previous file with comments | « src/unicode.h ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698