| 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/crankshaft/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.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/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
| (...skipping 2852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2863 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole); | 2863 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole); |
| 2864 } | 2864 } |
| 2865 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 2865 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
| 2866 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 2866 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
| 2867 Label done; | 2867 Label done; |
| 2868 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 2868 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
| 2869 __ cmp(result, scratch); | 2869 __ cmp(result, scratch); |
| 2870 __ b(ne, &done); | 2870 __ b(ne, &done); |
| 2871 if (info()->IsStub()) { | 2871 if (info()->IsStub()) { |
| 2872 // A stub can safely convert the hole to undefined only if the array | 2872 // A stub can safely convert the hole to undefined only if the array |
| 2873 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise | 2873 // protector cell contains (Smi) Isolate::kProtectorValid. Otherwise |
| 2874 // it needs to bail out. | 2874 // it needs to bail out. |
| 2875 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); | 2875 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); |
| 2876 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset)); | 2876 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset)); |
| 2877 __ cmp(result, Operand(Smi::FromInt(Isolate::kArrayProtectorValid))); | 2877 __ cmp(result, Operand(Smi::FromInt(Isolate::kProtectorValid))); |
| 2878 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole); | 2878 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole); |
| 2879 } | 2879 } |
| 2880 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); | 2880 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); |
| 2881 __ bind(&done); | 2881 __ bind(&done); |
| 2882 } | 2882 } |
| 2883 } | 2883 } |
| 2884 | 2884 |
| 2885 | 2885 |
| 2886 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { | 2886 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { |
| 2887 if (instr->is_fixed_typed_array()) { | 2887 if (instr->is_fixed_typed_array()) { |
| (...skipping 2494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5382 __ ldr(result, FieldMemOperand(scratch, | 5382 __ ldr(result, FieldMemOperand(scratch, |
| 5383 FixedArray::kHeaderSize - kPointerSize)); | 5383 FixedArray::kHeaderSize - kPointerSize)); |
| 5384 __ bind(deferred->exit()); | 5384 __ bind(deferred->exit()); |
| 5385 __ bind(&done); | 5385 __ bind(&done); |
| 5386 } | 5386 } |
| 5387 | 5387 |
| 5388 #undef __ | 5388 #undef __ |
| 5389 | 5389 |
| 5390 } // namespace internal | 5390 } // namespace internal |
| 5391 } // namespace v8 | 5391 } // namespace v8 |
| OLD | NEW |