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

Unified Diff: src/types.h

Issue 83003003: Introduce Type::IsCurrently (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
« no previous file with comments | « src/ic.cc ('k') | 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 eab78c2760a2109c84f56b3f026efb6088b6f6c4..d9d11f077e9f196d8f42cf1da97987bfceeaf598 100644
--- a/src/types.h
+++ b/src/types.h
@@ -153,13 +153,18 @@ class Type : public Object {
static Type* Of(Handle<i::Object> value) {
return from_bitset(LubBitset(*value));
}
- static Type* CurrentOf(Handle<i::Object> value);
bool Is(Type* that) { return (this == that) ? true : SlowIs(that); }
bool Is(Handle<Type> that) { return this->Is(*that); }
bool Maybe(Type* that);
bool Maybe(Handle<Type> that) { return this->Maybe(*that); }
+ // State-dependent versions of Of and Is that consider subtyping between
+ // a constant and its map class.
+ static Type* OfCurrently(Handle<i::Object> value);
+ bool IsCurrently(Type* that);
+ bool IsCurrently(Handle<Type> that) { return this->IsCurrently(*that); }
+
bool IsClass() { return is_class(); }
bool IsConstant() { return is_constant(); }
Handle<i::Map> AsClass() { return as_class(); }
« no previous file with comments | « src/ic.cc ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698