[turbofan] Replace yet another use of InferReceiverMaps
Bug: v8:9197 Change-Id: I7d2062d9c1000d17f7010786edfc50b5d82b1631 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1594559 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#61203}
This commit is contained in:
parent
cf984a493e
commit
b4041bdf48
@ -7,6 +7,7 @@
|
||||
#include "src/compiler/graph.h"
|
||||
#include "src/compiler/js-operator.h"
|
||||
#include "src/compiler/linkage.h"
|
||||
#include "src/compiler/map-inference.h"
|
||||
#include "src/compiler/node-matchers.h"
|
||||
#include "src/compiler/operator-properties.h"
|
||||
#include "src/compiler/simplified-operator.h"
|
||||
@ -560,20 +561,9 @@ bool NodeProperties::CanBePrimitive(JSHeapBroker* broker, Node* receiver,
|
||||
return value.map().IsPrimitiveMap();
|
||||
}
|
||||
default: {
|
||||
// We don't really care about the exact maps here,
|
||||
// just the instance types, which don't change
|
||||
// across potential side-effecting operations.
|
||||
ZoneHandleSet<Map> maps;
|
||||
if (InferReceiverMaps(broker, receiver, effect, &maps) !=
|
||||
kNoReceiverMaps) {
|
||||
// Check if one of the {maps} is not a JSReceiver map.
|
||||
for (size_t i = 0; i < maps.size(); ++i) {
|
||||
MapRef map(broker, maps[i]);
|
||||
if (!map.IsJSReceiverMap()) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
MapInference inference(broker, receiver, effect);
|
||||
return !inference.HaveMaps() ||
|
||||
!inference.AllOfInstanceTypesAreJSReceiver();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user