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

Unified Diff: src/compiler/typer.cc

Issue 2640783006: [turbofan] Assign proper types to various builtins. (Closed)
Patch Set: Created 3 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/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index 357e5fef4b728fe0ab88598ba3dc740d9e28113d..abb52c4c6a9ce69d93df696c455cd33b66c7a5bc 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -1460,6 +1460,8 @@ Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) {
return Type::OtherObject();
// Array functions.
+ case kArrayIsArray:
+ return Type::Boolean();
case kArrayConcat:
return Type::Receiver();
case kArrayEvery:
@@ -1494,6 +1496,9 @@ Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) {
return t->cache_.kPositiveSafeInteger;
// Object functions.
+ case kObjectAssign:
+ case kObjectCreate:
+ return Type::OtherObject();
case kObjectHasOwnProperty:
return Type::Boolean();
@@ -1522,6 +1527,46 @@ Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) {
case kGlobalIsFinite:
case kGlobalIsNaN:
return Type::Boolean();
+
+ // Map functions.
+ case kMapClear:
+ case kMapForEach:
+ return Type::Undefined();
+ case kMapDelete:
+ case kMapHas:
+ return Type::Boolean();
+ case kMapEntries:
+ case kMapKeys:
+ case kMapSet:
+ case kMapValues:
+ return Type::OtherObject();
+
+ // Set functions.
+ case kSetAdd:
+ case kSetEntries:
+ case kSetKeys:
+ case kSetValues:
+ return Type::OtherObject();
+ case kSetClear:
+ case kSetForEach:
+ return Type::Undefined();
+ case kSetDelete:
+ case kSetHas:
+ return Type::Boolean();
+
+ // WeakMap functions.
+ case kWeakMapDelete:
+ case kWeakMapHas:
+ return Type::Boolean();
+ case kWeakMapSet:
+ return Type::OtherObject();
+
+ // WeakSet functions.
+ case kWeakSetAdd:
+ return Type::OtherObject();
+ case kWeakSetDelete:
+ case kWeakSetHas:
+ return Type::Boolean();
default:
break;
}
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698