Allow deferred handle dereference in EmitLoadRegister to retrieve number.

R=mstarzinger@chromium.org
BUG=chromium:507977
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29549}
This commit is contained in:
yangguo 2015-07-09 02:26:49 -07:00 committed by Commit bot
parent a4584c07e7
commit fde4173afd
4 changed files with 4 additions and 0 deletions

View File

@ -427,6 +427,7 @@ Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) {
Handle<Object> literal = constant->handle(isolate()); Handle<Object> literal = constant->handle(isolate());
Representation r = chunk_->LookupLiteralRepresentation(const_op); Representation r = chunk_->LookupLiteralRepresentation(const_op);
if (r.IsInteger32()) { if (r.IsInteger32()) {
AllowDeferredHandleDereference get_number;
DCHECK(literal->IsNumber()); DCHECK(literal->IsNumber());
__ mov(scratch, Operand(static_cast<int32_t>(literal->Number()))); __ mov(scratch, Operand(static_cast<int32_t>(literal->Number())));
} else if (r.IsDouble()) { } else if (r.IsDouble()) {

View File

@ -424,6 +424,7 @@ Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) {
Handle<Object> literal = constant->handle(isolate()); Handle<Object> literal = constant->handle(isolate());
Representation r = chunk_->LookupLiteralRepresentation(const_op); Representation r = chunk_->LookupLiteralRepresentation(const_op);
if (r.IsInteger32()) { if (r.IsInteger32()) {
AllowDeferredHandleDereference get_number;
DCHECK(literal->IsNumber()); DCHECK(literal->IsNumber());
__ li(scratch, Operand(static_cast<int32_t>(literal->Number()))); __ li(scratch, Operand(static_cast<int32_t>(literal->Number())));
} else if (r.IsSmi()) { } else if (r.IsSmi()) {

View File

@ -407,6 +407,7 @@ Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) {
Handle<Object> literal = constant->handle(isolate()); Handle<Object> literal = constant->handle(isolate());
Representation r = chunk_->LookupLiteralRepresentation(const_op); Representation r = chunk_->LookupLiteralRepresentation(const_op);
if (r.IsInteger32()) { if (r.IsInteger32()) {
AllowDeferredHandleDereference get_number;
DCHECK(literal->IsNumber()); DCHECK(literal->IsNumber());
__ li(scratch, Operand(static_cast<int32_t>(literal->Number()))); __ li(scratch, Operand(static_cast<int32_t>(literal->Number())));
} else if (r.IsSmi()) { } else if (r.IsSmi()) {

View File

@ -417,6 +417,7 @@ Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) {
Handle<Object> literal = constant->handle(isolate()); Handle<Object> literal = constant->handle(isolate());
Representation r = chunk_->LookupLiteralRepresentation(const_op); Representation r = chunk_->LookupLiteralRepresentation(const_op);
if (r.IsInteger32()) { if (r.IsInteger32()) {
AllowDeferredHandleDereference get_number;
DCHECK(literal->IsNumber()); DCHECK(literal->IsNumber());
__ LoadIntLiteral(scratch, static_cast<int32_t>(literal->Number())); __ LoadIntLiteral(scratch, static_cast<int32_t>(literal->Number()));
} else if (r.IsDouble()) { } else if (r.IsDouble()) {