OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/crankshaft/ppc/lithium-codegen-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 4411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4422 { | 4422 { |
4423 PushSafepointRegistersScope scope(this); | 4423 PushSafepointRegistersScope scope(this); |
4424 if (instr->object()->IsRegister()) { | 4424 if (instr->object()->IsRegister()) { |
4425 __ Move(result, ToRegister(instr->object())); | 4425 __ Move(result, ToRegister(instr->object())); |
4426 } else { | 4426 } else { |
4427 __ LoadP(result, ToMemOperand(instr->object())); | 4427 __ LoadP(result, ToMemOperand(instr->object())); |
4428 } | 4428 } |
4429 | 4429 |
4430 LOperand* key = instr->key(); | 4430 LOperand* key = instr->key(); |
4431 if (key->IsConstantOperand()) { | 4431 if (key->IsConstantOperand()) { |
4432 __ LoadSmiLiteral(r6, ToSmi(LConstantOperand::cast(key))); | 4432 LConstantOperand* constant_key = LConstantOperand::cast(key); |
| 4433 int32_t int_key = ToInteger32(constant_key); |
| 4434 if (Smi::IsValid(int_key)) { |
| 4435 __ LoadSmiLiteral(r6, Smi::FromInt(int_key)); |
| 4436 } else { |
| 4437 // We should never get here at runtime because there is a smi check on |
| 4438 // the key before this point. |
| 4439 __ stop("expected smi"); |
| 4440 } |
4433 } else { | 4441 } else { |
4434 __ SmiTag(r6, ToRegister(key)); | 4442 __ SmiTag(r6, ToRegister(key)); |
4435 } | 4443 } |
4436 | 4444 |
4437 GrowArrayElementsStub stub(isolate(), instr->hydrogen()->is_js_array(), | 4445 GrowArrayElementsStub stub(isolate(), instr->hydrogen()->is_js_array(), |
4438 instr->hydrogen()->kind()); | 4446 instr->hydrogen()->kind()); |
4439 __ CallStub(&stub); | 4447 __ CallStub(&stub); |
4440 RecordSafepointWithLazyDeopt( | 4448 RecordSafepointWithLazyDeopt( |
4441 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 4449 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
4442 __ StoreToSafepointRegisterSlot(result, result); | 4450 __ StoreToSafepointRegisterSlot(result, result); |
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5751 __ LoadP(result, | 5759 __ LoadP(result, |
5752 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5760 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5753 __ bind(deferred->exit()); | 5761 __ bind(deferred->exit()); |
5754 __ bind(&done); | 5762 __ bind(&done); |
5755 } | 5763 } |
5756 | 5764 |
5757 #undef __ | 5765 #undef __ |
5758 | 5766 |
5759 } // namespace internal | 5767 } // namespace internal |
5760 } // namespace v8 | 5768 } // namespace v8 |
OLD | NEW |