Commit b79f397f authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Base JSCreateClosure comparison on location.

This changes hashing and comparison functions for JSCreateClosure
operators to be based in the handle location instead of the referenced
object identity. This is in sync with all other JS operators.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31225}
parent efdcd202
...@@ -423,7 +423,7 @@ const CreateArgumentsParameters& CreateArgumentsParametersOf( ...@@ -423,7 +423,7 @@ const CreateArgumentsParameters& CreateArgumentsParametersOf(
bool operator==(CreateClosureParameters const& lhs, bool operator==(CreateClosureParameters const& lhs,
CreateClosureParameters const& rhs) { CreateClosureParameters const& rhs) {
return lhs.pretenure() == rhs.pretenure() && return lhs.pretenure() == rhs.pretenure() &&
lhs.shared_info().is_identical_to(rhs.shared_info()); lhs.shared_info().location() == rhs.shared_info().location();
} }
...@@ -434,9 +434,7 @@ bool operator!=(CreateClosureParameters const& lhs, ...@@ -434,9 +434,7 @@ bool operator!=(CreateClosureParameters const& lhs,
size_t hash_value(CreateClosureParameters const& p) { size_t hash_value(CreateClosureParameters const& p) {
// TODO(mstarzinger): Include hash of the SharedFunctionInfo here. return base::hash_combine(p.pretenure(), p.shared_info().location());
base::hash<PretenureFlag> h;
return h(p.pretenure());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment