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

Unified Diff: src/types.cc

Issue 18078002: Type handling for special cases and optimization (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 6 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/types.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/types.cc
diff --git a/src/types.cc b/src/types.cc
index b8febc2a149ad4e7e488a8cfc4e6a59f6c896da6..1275deacb744e7b2f60485e6c0deaa9005f1fc59 100644
--- a/src/types.cc
+++ b/src/types.cc
@@ -131,6 +131,7 @@ int Type::LubBitset() {
if (value->IsUndefined()) return kUndefined;
if (value->IsNull()) return kNull;
if (value->IsTrue() || value->IsFalse()) return kBoolean;
+ if (value->IsTheHole()) return kAny;
}
}
switch (map->instance_type()) {
@@ -200,6 +201,10 @@ int Type::LubBitset() {
// We ought to find a cleaner solution for compiling stubs parameterised
// over type or class variables, esp ones with bounds...
return kDetectable;
+ case DECLARED_ACCESSOR_INFO_TYPE:
+ case EXECUTABLE_ACCESSOR_INFO_TYPE:
+ case ACCESSOR_PAIR_TYPE:
+ return kInternal;
default:
UNREACHABLE();
return kNone;
@@ -222,7 +227,7 @@ int Type::GlbBitset() {
// Check this <= that.
-bool Type::Is(Type* that) {
+bool Type::IsSlowCase(Type* that) {
// Fast path for bitsets.
if (that->is_bitset()) {
return (this->LubBitset() | that->as_bitset()) == that->as_bitset();
« no previous file with comments | « src/types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698