}
-bool HCheckMaps::HandleSideEffectDominator(GVNFlag side_effect,
- HValue* dominator) {
- ASSERT(side_effect == kMaps);
- // TODO(mstarzinger): For now we specialize on HStoreNamedField, but once
- // type information is rich enough we should generalize this to any HType
- // for which the map is known.
- if (HasNoUses() && dominator->IsStoreNamedField()) {
- HStoreNamedField* store = HStoreNamedField::cast(dominator);
- if (!store->has_transition() || store->object() != value()) return false;
- HConstant* transition = HConstant::cast(store->transition());
- if (map_set_.Contains(Unique<Map>::cast(transition->GetUnique()))) {
- DeleteAndReplaceWith(NULL);
- return true;
- }
- }
- return false;
-}
-
-
void HCheckMaps::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream);
stream->Add(" [%p", *map_set_.at(0).handle());
V(WrapReceiver)
#define GVN_TRACKED_FLAG_LIST(V) \
- V(Maps) \
V(NewSpacePromotion)
#define GVN_UNTRACKED_FLAG_LIST(V) \
V(ElementsPointer) \
V(GlobalVars) \
V(InobjectFields) \
+ V(Maps) \
V(OsrEntries) \
V(ExternalMemory) \
V(StringChars) \
virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
return Representation::Tagged();
}
- virtual bool HandleSideEffectDominator(GVNFlag side_effect,
- HValue* dominator) V8_OVERRIDE;
virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
HValue* value() { return OperandAt(0); }
SetOperandAt(1, typecheck != NULL ? typecheck : value);
set_representation(Representation::Tagged());
SetFlag(kUseGVN);
- SetFlag(kTrackSideEffectDominators);
}
bool omit_;