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:
parent
a4584c07e7
commit
fde4173afd
@ -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()) {
|
||||||
|
@ -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()) {
|
||||||
|
@ -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()) {
|
||||||
|
@ -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()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user