Commit 06b749eb authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Eliminate another use of raw InferReceiverMaps

Replace the unsafe function NodeProperties::HasInstanceTypeWitness
with a new safe method on MapInference.

Bug: v8:9197
Change-Id: I937433c7721946139dc761750ea34032e58e275c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1591612Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61156}
parent f27a6e92
This diff is collapsed.
......@@ -523,30 +523,6 @@ NodeProperties::InferReceiverMapsResult NodeProperties::InferReceiverMaps(
}
}
// static
bool NodeProperties::HasInstanceTypeWitness(JSHeapBroker* broker,
Node* receiver, Node* effect,
InstanceType instance_type) {
ZoneHandleSet<Map> receiver_maps;
NodeProperties::InferReceiverMapsResult result =
NodeProperties::InferReceiverMaps(broker, receiver, effect,
&receiver_maps);
switch (result) {
case NodeProperties::kUnreliableReceiverMaps:
case NodeProperties::kReliableReceiverMaps:
DCHECK_NE(0, receiver_maps.size());
for (size_t i = 0; i < receiver_maps.size(); ++i) {
MapRef map(broker, receiver_maps[i]);
if (map.instance_type() != instance_type) return false;
}
return true;
case NodeProperties::kNoReceiverMaps:
return false;
}
UNREACHABLE();
}
// static
bool NodeProperties::NoObservableSideEffectBetween(Node* effect,
Node* dominator) {
......
......@@ -158,9 +158,6 @@ class V8_EXPORT_PRIVATE NodeProperties final {
static base::Optional<MapRef> GetJSCreateMap(JSHeapBroker* broker,
Node* receiver);
static bool HasInstanceTypeWitness(JSHeapBroker* broker, Node* receiver,
Node* effect, InstanceType instance_type);
// Walks up the {effect} chain to check that there's no observable side-effect
// between the {effect} and it's {dominator}. Aborts the walk if there's join
// in the effect chain.
......
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