44 static_cast<bool (*)(
InstanceType)
>(&InstanceTypeChecker::IsJSReceiver));
48 CHECK(!InstanceTypeChecker::IsString(type));
54 CHECK(!InstanceTypeChecker::IsString(type));
68 auto instance_type = [f](
MapRef map) {
return f(map.instance_type()); };
69 return std::all_of(
maps_.begin(),
maps_.end(), instance_type);
76 auto instance_type = [f](
MapRef map) {
return f(map.instance_type()); };
78 return std::any_of(
maps_.begin(),
maps_.end(), instance_type);
88 if (
maps_.size() != 1)
return false;
89 return maps_.at(0).equals(expected_map);
96 CHECK(feedback.IsValid());
97 *effect =
jsgraph->graph()->NewNode(
113 if (
Safe())
return false;
123 if (
Safe())
return true;
125 auto is_stable = [](
MapRef map) {
return map.is_stable(); };
126 if (dependencies !=
nullptr &&
127 std::all_of(
maps_.begin(),
maps_.end(), is_stable)) {
133 }
else if (feedback.IsValid()) {
void DependOnStableMap(MapRef map)
V8_WARN_UNUSED_RESULT bool Is(MapRef expected_map)
bool RelyOnMapsPreferStability(CompilationDependencies *dependencies, JSGraph *jsgraph, Effect *effect, Control control, const FeedbackSource &feedback)
enum v8::internal::compiler::MapInference::@47 maps_state_
V8_WARN_UNUSED_RESULT bool AllOfInstanceTypesUnsafe(std::function< bool(InstanceType)> f) const
V8_WARN_UNUSED_RESULT bool RelyOnMapsViaStability(CompilationDependencies *dependencies)
V8_WARN_UNUSED_RESULT ZoneRefSet< Map > const & GetMaps()
JSHeapBroker *const broker_
V8_WARN_UNUSED_RESULT bool AllOfInstanceTypesAre(InstanceType type) const
void SetNeedGuardIfUnreliable()
MapInference(JSHeapBroker *broker, Node *object, Effect effect)
@ kUnreliableDontNeedGuard
V8_WARN_UNUSED_RESULT Reduction NoChange()
void InsertMapChecks(JSGraph *jsgraph, Effect *effect, Control control, const FeedbackSource &feedback)
V8_WARN_UNUSED_RESULT bool RelyOnMapsHelper(CompilationDependencies *dependencies, JSGraph *jsgraph, Effect *effect, Control control, const FeedbackSource &feedback)
V8_WARN_UNUSED_RESULT bool AnyOfInstanceTypesUnsafe(std::function< bool(InstanceType)> f) const
V8_WARN_UNUSED_RESULT bool HaveMaps() const
V8_WARN_UNUSED_RESULT bool AllOfInstanceTypesAreJSReceiver() const
V8_WARN_UNUSED_RESULT bool AnyOfInstanceTypesAre(InstanceType type) const
V8_WARN_UNUSED_RESULT bool AllOfInstanceTypes(std::function< bool(InstanceType)> f)
static InferMapsResult InferMapsUnsafe(JSHeapBroker *broker, Node *receiver, Effect effect, ZoneRefSet< Map > *maps_out)
static Reduction NoChange()
JSHeapBroker *const broker_
ZoneVector< RpoNumber > & result
#define DCHECK_EQ(v1, v2)