[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:
parent
476296b96b
commit
fe104b0dc3
@ -1217,7 +1217,7 @@ Type* Typer::Visitor::TypeJSCreateArray(Node* node) {
|
||||
|
||||
|
||||
Type* Typer::Visitor::TypeJSCreateClosure(Node* node) {
|
||||
return Type::OtherObject();
|
||||
return Type::Function();
|
||||
}
|
||||
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user