Commit 6bd7bd4b authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Use CheckMaps in JSGlobalObjectSpecialization.

This is a simple cleanup to use the recently added CheckMaps operator
instead of the hand-crafted map check sequence.

R=epertoso@chromium.org

Review-Url: https://codereview.chromium.org/2199263002
Cr-Commit-Position: refs/heads/master@{#38242}
parent c9324fe6
...@@ -186,17 +186,12 @@ Reduction JSGlobalObjectSpecialization::ReduceJSStoreGlobal(Node* node) { ...@@ -186,17 +186,12 @@ Reduction JSGlobalObjectSpecialization::ReduceJSStoreGlobal(Node* node) {
value = effect = graph()->NewNode(simplified()->CheckTaggedPointer(), value = effect = graph()->NewNode(simplified()->CheckTaggedPointer(),
value, effect, control); value, effect, control);
// Load the {value} map check against the {property_cell} map. // Check {value} map agains the {property_cell} map.
Node* value_map = effect =
graph()->NewNode(simplified()->LoadField(AccessBuilder::ForMap()),
value, effect, control);
Handle<Map> property_cell_value_map( Handle<Map> property_cell_value_map(
Handle<HeapObject>::cast(property_cell_value)->map(), isolate()); Handle<HeapObject>::cast(property_cell_value)->map(), isolate());
Node* check = graph()->NewNode( effect = graph()->NewNode(
simplified()->ReferenceEqual(Type::Any()), value_map, simplified()->CheckMaps(1), value,
jsgraph()->HeapConstant(property_cell_value_map)); jsgraph()->HeapConstant(property_cell_value_map), effect, control);
effect =
graph()->NewNode(simplified()->CheckIf(), check, effect, control);
property_cell_value_type = Type::TaggedPointer(); property_cell_value_type = Type::TaggedPointer();
} else { } else {
// Check that the {value} is a Smi. // Check that the {value} is a Smi.
......
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