OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 | 420 |
421 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { | 421 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { |
422 if (op->IsRegister()) { | 422 if (op->IsRegister()) { |
423 return ToRegister(op->index()); | 423 return ToRegister(op->index()); |
424 } else if (op->IsConstantOperand()) { | 424 } else if (op->IsConstantOperand()) { |
425 LConstantOperand* const_op = LConstantOperand::cast(op); | 425 LConstantOperand* const_op = LConstantOperand::cast(op); |
426 HConstant* constant = chunk_->LookupConstant(const_op); | 426 HConstant* constant = chunk_->LookupConstant(const_op); |
427 Handle<Object> literal = constant->handle(isolate()); | 427 Handle<Object> literal = constant->handle(isolate()); |
428 Representation r = chunk_->LookupLiteralRepresentation(const_op); | 428 Representation r = chunk_->LookupLiteralRepresentation(const_op); |
429 if (r.IsInteger32()) { | 429 if (r.IsInteger32()) { |
| 430 AllowDeferredHandleDereference get_number; |
430 DCHECK(literal->IsNumber()); | 431 DCHECK(literal->IsNumber()); |
431 __ mov(scratch, Operand(static_cast<int32_t>(literal->Number()))); | 432 __ mov(scratch, Operand(static_cast<int32_t>(literal->Number()))); |
432 } else if (r.IsDouble()) { | 433 } else if (r.IsDouble()) { |
433 Abort(kEmitLoadRegisterUnsupportedDoubleImmediate); | 434 Abort(kEmitLoadRegisterUnsupportedDoubleImmediate); |
434 } else { | 435 } else { |
435 DCHECK(r.IsSmiOrTagged()); | 436 DCHECK(r.IsSmiOrTagged()); |
436 __ Move(scratch, literal); | 437 __ Move(scratch, literal); |
437 } | 438 } |
438 return scratch; | 439 return scratch; |
439 } else if (op->IsStackSlot()) { | 440 } else if (op->IsStackSlot()) { |
(...skipping 5549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5989 __ push(ToRegister(instr->function())); | 5990 __ push(ToRegister(instr->function())); |
5990 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5991 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5991 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5992 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5992 } | 5993 } |
5993 | 5994 |
5994 | 5995 |
5995 #undef __ | 5996 #undef __ |
5996 | 5997 |
5997 } // namespace internal | 5998 } // namespace internal |
5998 } // namespace v8 | 5999 } // namespace v8 |
OLD | NEW |