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 1410343016: [turbofan] Introduce a Function type and optimize based on it. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Undo unrelated change. Created 5 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/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 b65f167daeb348afb5d033b72bad53f38de1cbb9..b1002be26ae93f2bcf25cf6d8ba6453ef605484b 100644
--- a/src/types.cc
+++ b/src/types.cc
@@ -173,7 +173,7 @@ TypeImpl<Config>::BitsetType::Lub(TypeImpl* type) {
if (type->IsRange()) return type->AsRange()->Lub();
if (type->IsContext()) return kInternal & kTaggedPointer;
if (type->IsArray()) return kOtherObject;
- if (type->IsFunction()) return kOtherObject; // TODO(rossberg): kFunction
+ if (type->IsFunction()) return kFunction;
UNREACHABLE();
return kNone;
}
@@ -247,7 +247,8 @@ TypeImpl<Config>::BitsetType::Lub(i::Map* map) {
if (map->is_undetectable()) return kUndetectable;
return kOtherObject;
case JS_FUNCTION_TYPE:
- return kOtherObject; // TODO(rossberg): there should be a Function type.
+ if (map->is_undetectable()) return kUndetectable;
+ return kFunction;
case JS_REGEXP_TYPE:
return kOtherObject; // TODO(rossberg): there should be a RegExp type.
case JS_PROXY_TYPE:
« 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