Parallel compilation bug: LCallNewArray dereferenced a handle unnecessarily.

BUG=
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/14761010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7ec7a280
...@@ -4188,8 +4188,7 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) { ...@@ -4188,8 +4188,7 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
__ mov(r0, Operand(instr->arity())); __ mov(r0, Operand(instr->arity()));
__ mov(r2, Operand(instr->hydrogen()->property_cell())); __ mov(r2, Operand(instr->hydrogen()->property_cell()));
Object* cell_value = instr->hydrogen()->property_cell()->value(); ElementsKind kind = instr->hydrogen()->elements_kind();
ElementsKind kind = static_cast<ElementsKind>(Smi::cast(cell_value)->value());
if (instr->arity() == 0) { if (instr->arity() == 0) {
ArrayNoArgumentConstructorStub stub(kind); ArrayNoArgumentConstructorStub stub(kind);
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
......
...@@ -2353,15 +2353,20 @@ class HCallNewArray: public HCallNew { ...@@ -2353,15 +2353,20 @@ class HCallNewArray: public HCallNew {
Handle<JSGlobalPropertyCell> type_cell) Handle<JSGlobalPropertyCell> type_cell)
: HCallNew(context, constructor, argument_count), : HCallNew(context, constructor, argument_count),
type_cell_(type_cell) { type_cell_(type_cell) {
elements_kind_ = static_cast<ElementsKind>(
Smi::cast(type_cell->value())->value());
} }
Handle<JSGlobalPropertyCell> property_cell() const { Handle<JSGlobalPropertyCell> property_cell() const {
return type_cell_; return type_cell_;
} }
ElementsKind elements_kind() const { return elements_kind_; }
DECLARE_CONCRETE_INSTRUCTION(CallNewArray) DECLARE_CONCRETE_INSTRUCTION(CallNewArray)
private: private:
ElementsKind elements_kind_;
Handle<JSGlobalPropertyCell> type_cell_; Handle<JSGlobalPropertyCell> type_cell_;
}; };
......
...@@ -4191,8 +4191,7 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) { ...@@ -4191,8 +4191,7 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
__ Set(eax, Immediate(instr->arity())); __ Set(eax, Immediate(instr->arity()));
__ mov(ebx, instr->hydrogen()->property_cell()); __ mov(ebx, instr->hydrogen()->property_cell());
Object* cell_value = instr->hydrogen()->property_cell()->value(); ElementsKind kind = instr->hydrogen()->elements_kind();
ElementsKind kind = static_cast<ElementsKind>(Smi::cast(cell_value)->value());
if (instr->arity() == 0) { if (instr->arity() == 0) {
ArrayNoArgumentConstructorStub stub(kind); ArrayNoArgumentConstructorStub stub(kind);
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
......
...@@ -3881,8 +3881,7 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) { ...@@ -3881,8 +3881,7 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
__ li(a0, Operand(instr->arity())); __ li(a0, Operand(instr->arity()));
__ li(a2, Operand(instr->hydrogen()->property_cell())); __ li(a2, Operand(instr->hydrogen()->property_cell()));
Object* cell_value = instr->hydrogen()->property_cell()->value(); ElementsKind kind = instr->hydrogen()->elements_kind();
ElementsKind kind = static_cast<ElementsKind>(Smi::cast(cell_value)->value());
if (instr->arity() == 0) { if (instr->arity() == 0) {
ArrayNoArgumentConstructorStub stub(kind); ArrayNoArgumentConstructorStub stub(kind);
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
......
...@@ -3876,8 +3876,7 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) { ...@@ -3876,8 +3876,7 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
__ Set(rax, instr->arity()); __ Set(rax, instr->arity());
__ Move(rbx, instr->hydrogen()->property_cell()); __ Move(rbx, instr->hydrogen()->property_cell());
Object* cell_value = instr->hydrogen()->property_cell()->value(); ElementsKind kind = instr->hydrogen()->elements_kind();
ElementsKind kind = static_cast<ElementsKind>(Smi::cast(cell_value)->value());
if (instr->arity() == 0) { if (instr->arity() == 0) {
ArrayNoArgumentConstructorStub stub(kind); ArrayNoArgumentConstructorStub stub(kind);
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment