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

Unified Diff: src/types.h

Issue 221813002: Add unhandlified versions of Of() and NowOf(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 d5e3ca4d3de458534665ac371761d1c09bb3c505..42a50b922bd0f0f56441d853687b4fd390466041 100644
--- a/src/types.h
+++ b/src/types.h
@@ -213,8 +213,11 @@ class TypeImpl : public Config::Base {
static TypeHandle Union(TypeHandle type1, TypeHandle type2, Region* reg);
static TypeHandle Intersect(TypeHandle type1, TypeHandle type2, Region* reg);
+ static TypeHandle Of(i::Object* value, Region* region) {
+ return Config::from_bitset(LubBitset(value), region);
+ }
static TypeHandle Of(i::Handle<i::Object> value, Region* region) {
- return Config::from_bitset(LubBitset(*value), region);
+ return Of(*value, region);
}
bool Is(TypeImpl* that) { return this == that || this->SlowIs(that); }
@@ -231,7 +234,10 @@ class TypeImpl : public Config::Base {
// State-dependent versions of Of and Is that consider subtyping between
// a constant and its map class.
- static TypeHandle NowOf(i::Handle<i::Object> value, Region* region);
+ static TypeHandle NowOf(i::Object* value, Region* region);
+ static TypeHandle NowOf(i::Handle<i::Object> value, Region* region) {
+ return NowOf(*value, region);
+ }
bool NowIs(TypeImpl* that);
template<class TypeHandle>
bool NowIs(TypeHandle that) { return this->NowIs(*that); }
« 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