: elements_kind_(elements_kind),
index_offset_(0),
is_dehoisted_(false),
+ is_uninitialized_(false),
new_space_dominator_(NULL) {
SetOperandAt(0, obj);
SetOperandAt(1, key);
virtual Representation observed_input_representation(int index) {
if (index < 2) return RequiredInputRepresentation(index);
+ if (IsUninitialized()) {
+ return Representation::None();
+ }
if (IsFastSmiElementsKind(elements_kind())) {
return Representation::Smi();
}
void SetKey(HValue* key) { SetOperandAt(1, key); }
bool IsDehoisted() { return is_dehoisted_; }
void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; }
+ bool IsUninitialized() { return is_uninitialized_; }
+ void SetUninitialized(bool is_uninitialized) {
+ is_uninitialized_ = is_uninitialized;
+ }
bool IsConstantHoleStore() {
return value()->IsConstant() && HConstant::cast(value())->IsTheHole();
private:
ElementsKind elements_kind_;
uint32_t index_offset_;
- bool is_dehoisted_;
+ bool is_dehoisted_ : 1;
+ bool is_uninitialized_ : 1;
HValue* new_space_dominator_;
};
Handle<Object> raw_boilerplate(literals->get(expr->literal_index()),
isolate());
+ bool uninitialized = false;
if (raw_boilerplate->IsUndefined()) {
+ uninitialized = true;
raw_boilerplate = Runtime::CreateArrayLiteralBoilerplate(
isolate(), literals, expr->constant_elements());
if (raw_boilerplate.is_null()) {
case FAST_ELEMENTS:
case FAST_HOLEY_ELEMENTS:
case FAST_DOUBLE_ELEMENTS:
- case FAST_HOLEY_DOUBLE_ELEMENTS:
- Add<HStoreKeyed>(elements, key, value,
- boilerplate_elements_kind);
+ case FAST_HOLEY_DOUBLE_ELEMENTS: {
+ HStoreKeyed* instr = Add<HStoreKeyed>(elements, key, value,
+ boilerplate_elements_kind);
+ instr->SetUninitialized(uninitialized);
break;
+ }
default:
UNREACHABLE();
break;