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

Unified Diff: src/compiler/typer.cc

Issue 2819583002: [turbofan] Introduce a dedicated Array type. (Closed)
Patch Set: Created 3 years, 8 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/compiler/js-create-lowering.cc ('k') | src/compiler/types.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 94c54ac60089a60418f1e22ae263bc2ba9e236dc..3150222b79f8ce0322ffbcf26fff40e185c04631 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -1119,11 +1119,7 @@ Type* Typer::Visitor::TypeJSCreateArguments(Node* node) {
return Type::OtherObject();
}
-
-Type* Typer::Visitor::TypeJSCreateArray(Node* node) {
- return Type::OtherObject();
-}
-
+Type* Typer::Visitor::TypeJSCreateArray(Node* node) { return Type::Array(); }
Type* Typer::Visitor::TypeJSCreateClosure(Node* node) {
return Type::Function();
@@ -1139,7 +1135,7 @@ Type* Typer::Visitor::TypeJSCreateKeyValueArray(Node* node) {
}
Type* Typer::Visitor::TypeJSCreateLiteralArray(Node* node) {
- return Type::OtherObject();
+ return Type::Array();
}
@@ -1516,6 +1512,7 @@ Type* Typer::Visitor::JSCallTyper(Type* fun, Typer* t) {
// Object functions.
case kObjectAssign:
+ return Type::Receiver();
case kObjectCreate:
return Type::OtherObject();
case kObjectHasOwnProperty:
@@ -1527,7 +1524,7 @@ Type* Typer::Visitor::JSCallTyper(Type* fun, Typer* t) {
case kRegExpCompile:
return Type::OtherObject();
case kRegExpExec:
- return Type::Union(Type::OtherObject(), Type::Null(), t->zone());
+ return Type::Union(Type::Array(), Type::Null(), t->zone());
case kRegExpTest:
return Type::Boolean();
case kRegExpToString:
« no previous file with comments | « src/compiler/js-create-lowering.cc ('k') | src/compiler/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698