// TODO(bmeurer): We'll need kDependsOnRoots once we add the
// corresponding HStoreRoot instruction.
SetDependsOnFlag(kCalls);
+ set_representation(Representation::Tagged());
}
virtual bool IsDeletable() const OVERRIDE { return true; }
return !access().IsInobject() || access().offset() >= size;
}
virtual Representation RequiredInputRepresentation(int index) OVERRIDE {
- if (index == 0 && access().IsExternalMemory()) {
+ if (index == 0) {
// object must be external in case of external memory access
- return Representation::External();
+ return access().IsExternalMemory() ? Representation::External()
+ : Representation::Tagged();
}
- return Representation::Tagged();
+ DCHECK(index == 1);
+ return Representation::None();
}
virtual Range* InferRange(Zone* zone) OVERRIDE;
virtual std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT
void HRepresentationChangesPhase::InsertRepresentationChangesForValue(
HValue* value) {
Representation r = value->representation();
- if (r.IsNone()) return;
+ if (r.IsNone()) {
+#ifdef DEBUG
+ for (HUseIterator it(value->uses()); !it.Done(); it.Advance()) {
+ HValue* use_value = it.value();
+ int use_index = it.index();
+ Representation req = use_value->RequiredInputRepresentation(use_index);
+ DCHECK(req.IsNone());
+ }
+#endif
+ return;
+ }
if (value->HasNoUses()) {
if (value->IsForceRepresentation()) value->DeleteAndReplaceWith(NULL);
return;