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

Unified Diff: src/compiler/typer.cc

Issue 2828573004: [turbofan] Fix typing rule for JSCreateArguments. (Closed)
Patch Set: Also fix the verifier. 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 | « no previous file | 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 3150222b79f8ce0322ffbcf26fff40e185c04631..85e5a170600791973321324decabda1729aceaab 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -1116,7 +1116,15 @@ Type* Typer::Visitor::TypeJSCreate(Node* node) { return Type::Object(); }
Type* Typer::Visitor::TypeJSCreateArguments(Node* node) {
- return Type::OtherObject();
+ switch (CreateArgumentsTypeOf(node->op())) {
+ case CreateArgumentsType::kRestParameter:
+ return Type::Array();
+ case CreateArgumentsType::kMappedArguments:
+ case CreateArgumentsType::kUnmappedArguments:
+ return Type::OtherObject();
+ }
+ UNREACHABLE();
+ return nullptr;
}
Type* Typer::Visitor::TypeJSCreateArray(Node* node) { return Type::Array(); }
« no previous file with comments | « no previous file | src/compiler/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698