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

Unified Diff: src/vector.h

Issue 2551053002: [wasm] Always provide a wasm instance object at runtime (Closed)
Patch Set: Rebase Created 4 years 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/runtime-debug.cc ('k') | src/wasm/wasm-module.h » ('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 1b9884f4d7915454184195b11be64df477c29bdf..eb5808322c731f404c3ff2b2d1cfcc2490b78526 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -119,6 +119,9 @@ class Vector {
return Vector<T>(start_ + offset, length_ - offset);
}
+ // Implicit conversion from Vector<T> to Vector<const T>.
+ inline operator Vector<const T>() { return Vector<const T>::cast(*this); }
+
// Factory method for creating empty vectors.
static Vector<T> empty() { return Vector<T>(NULL, 0); }
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698