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 3031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3042 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 3042 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
3043 Label done; | 3043 Label done; |
3044 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 3044 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
3045 __ cmp(result, scratch); | 3045 __ cmp(result, scratch); |
3046 __ bne(&done); | 3046 __ bne(&done); |
3047 if (info()->IsStub()) { | 3047 if (info()->IsStub()) { |
3048 // A stub can safely convert the hole to undefined only if the array | 3048 // A stub can safely convert the hole to undefined only if the array |
3049 // protector cell contains (Smi) Isolate::kProtectorValid. Otherwise | 3049 // protector cell contains (Smi) Isolate::kProtectorValid. Otherwise |
3050 // it needs to bail out. | 3050 // it needs to bail out. |
3051 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); | 3051 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); |
3052 __ LoadP(result, FieldMemOperand(result, Cell::kValueOffset)); | 3052 __ LoadP(result, FieldMemOperand(result, PropertyCell::kValueOffset)); |
3053 __ CmpSmiLiteral(result, Smi::FromInt(Isolate::kProtectorValid), r0); | 3053 __ CmpSmiLiteral(result, Smi::FromInt(Isolate::kProtectorValid), r0); |
3054 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole); | 3054 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole); |
3055 } | 3055 } |
3056 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); | 3056 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); |
3057 __ bind(&done); | 3057 __ bind(&done); |
3058 } | 3058 } |
3059 } | 3059 } |
3060 | 3060 |
3061 | 3061 |
3062 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { | 3062 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { |
(...skipping 2589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5652 __ LoadP(result, | 5652 __ LoadP(result, |
5653 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5653 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5654 __ bind(deferred->exit()); | 5654 __ bind(deferred->exit()); |
5655 __ bind(&done); | 5655 __ bind(&done); |
5656 } | 5656 } |
5657 | 5657 |
5658 #undef __ | 5658 #undef __ |
5659 | 5659 |
5660 } // namespace internal | 5660 } // namespace internal |
5661 } // namespace v8 | 5661 } // namespace v8 |
OLD | NEW |