[turbofan] Fix type of JSCreateClosure to be Function.

The JSCreateClosure operator always produces a function, so the type
should reflect that.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/1532503002

Cr-Commit-Position: refs/heads/master@{#32881}
This commit is contained in:
bmeurer 2015-12-16 00:13:31 -08:00 committed by Commit bot
parent 476296b96b
commit fe104b0dc3
2 changed files with 2 additions and 2 deletions

View File

@ -1217,7 +1217,7 @@ Type* Typer::Visitor::TypeJSCreateArray(Node* node) {
Type* Typer::Visitor::TypeJSCreateClosure(Node* node) {
return Type::OtherObject();
return Type::Function();
}

View File

@ -516,7 +516,7 @@ void Verifier::Visitor::Check(Node* node) {
break;
case IrOpcode::kJSCreateClosure:
// Type is Function.
CheckUpperIs(node, Type::OtherObject());
CheckUpperIs(node, Type::Function());
break;
case IrOpcode::kJSCreateLiteralArray:
case IrOpcode::kJSCreateLiteralObject: