__ mov(r0, Operand(instr->arity()));
__ mov(r2, Operand(instr->hydrogen()->property_cell()));
- Object* cell_value = instr->hydrogen()->property_cell()->value();
- ElementsKind kind = static_cast<ElementsKind>(Smi::cast(cell_value)->value());
+ ElementsKind kind = instr->hydrogen()->elements_kind();
if (instr->arity() == 0) {
ArrayNoArgumentConstructorStub stub(kind);
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
Handle<JSGlobalPropertyCell> type_cell)
: HCallNew(context, constructor, argument_count),
type_cell_(type_cell) {
+ elements_kind_ = static_cast<ElementsKind>(
+ Smi::cast(type_cell->value())->value());
}
Handle<JSGlobalPropertyCell> property_cell() const {
return type_cell_;
}
+ ElementsKind elements_kind() const { return elements_kind_; }
+
DECLARE_CONCRETE_INSTRUCTION(CallNewArray)
private:
+ ElementsKind elements_kind_;
Handle<JSGlobalPropertyCell> type_cell_;
};
__ Set(eax, Immediate(instr->arity()));
__ mov(ebx, instr->hydrogen()->property_cell());
- Object* cell_value = instr->hydrogen()->property_cell()->value();
- ElementsKind kind = static_cast<ElementsKind>(Smi::cast(cell_value)->value());
+ ElementsKind kind = instr->hydrogen()->elements_kind();
if (instr->arity() == 0) {
ArrayNoArgumentConstructorStub stub(kind);
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
__ li(a0, Operand(instr->arity()));
__ li(a2, Operand(instr->hydrogen()->property_cell()));
- Object* cell_value = instr->hydrogen()->property_cell()->value();
- ElementsKind kind = static_cast<ElementsKind>(Smi::cast(cell_value)->value());
+ ElementsKind kind = instr->hydrogen()->elements_kind();
if (instr->arity() == 0) {
ArrayNoArgumentConstructorStub stub(kind);
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
__ Set(rax, instr->arity());
__ Move(rbx, instr->hydrogen()->property_cell());
- Object* cell_value = instr->hydrogen()->property_cell()->value();
- ElementsKind kind = static_cast<ElementsKind>(Smi::cast(cell_value)->value());
+ ElementsKind kind = instr->hydrogen()->elements_kind();
if (instr->arity() == 0) {
ArrayNoArgumentConstructorStub stub(kind);
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);