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

Unified Diff: src/types.h

Issue 145083007: Type representation converter (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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 | « no previous file | src/types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/types.h
diff --git a/src/types.h b/src/types.h
index e7b306e4fa6568fe13ac52777fc6a9d7f1e662ce..99a809dc10d06ae5108e2c64667982c867018d0a 100644
--- a/src/types.h
+++ b/src/types.h
@@ -243,6 +243,10 @@ class TypeImpl : public Config::Base {
return t;
}
+ template<class OtherTypeImpl>
+ static TypeHandle Convert(
+ typename OtherTypeImpl::TypeHandle type, Region* region);
+
#ifdef OBJECT_PRINT
void TypePrint();
void TypePrint(FILE* out);
@@ -250,6 +254,7 @@ class TypeImpl : public Config::Base {
private:
template<class> friend class Iterator;
+ template<class> friend class TypeImpl;
// A union is a fixed array containing types. Invariants:
// - its length is at least 2
@@ -272,6 +277,13 @@ class TypeImpl : public Config::Base {
int AsBitset() { return Config::as_bitset(this); }
UnionedHandle AsUnion() { return Config::as_union(this); }
+ static int UnionLength(UnionedHandle unioned) {
+ return Config::union_length(unioned);
+ }
+ static TypeHandle UnionGet(UnionedHandle unioned, int i) {
+ return Config::union_get(unioned, i);
+ }
+
bool SlowIs(TypeImpl* that);
int LubBitset(); // least upper bound that's a bitset
« no previous file with comments | « no previous file | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698