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 3134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3145 DeoptimizeIf(eq, instr, Deoptimizer::kHole); | 3145 DeoptimizeIf(eq, instr, Deoptimizer::kHole); |
3146 } | 3146 } |
3147 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 3147 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
3148 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 3148 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
3149 Label done; | 3149 Label done; |
3150 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 3150 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
3151 __ cmp(result, scratch); | 3151 __ cmp(result, scratch); |
3152 __ b(ne, &done); | 3152 __ b(ne, &done); |
3153 if (info()->IsStub()) { | 3153 if (info()->IsStub()) { |
3154 // A stub can safely convert the hole to undefined only if the array | 3154 // A stub can safely convert the hole to undefined only if the array |
3155 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise | 3155 // protector cell contains (Smi) Isolate::kArrayElementsProtectorValid. |
| 3156 // Otherwise |
3156 // it needs to bail out. | 3157 // it needs to bail out. |
3157 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); | 3158 __ LoadRoot(result, Heap::kArrayElementsProtectorRootIndex); |
3158 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset)); | 3159 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset)); |
3159 __ cmp(result, Operand(Smi::FromInt(Isolate::kArrayProtectorValid))); | 3160 __ cmp(result, |
| 3161 Operand(Smi::FromInt(Isolate::kArrayElementsProtectorValid))); |
3160 DeoptimizeIf(ne, instr, Deoptimizer::kHole); | 3162 DeoptimizeIf(ne, instr, Deoptimizer::kHole); |
3161 } | 3163 } |
3162 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); | 3164 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); |
3163 __ bind(&done); | 3165 __ bind(&done); |
3164 } | 3166 } |
3165 } | 3167 } |
3166 | 3168 |
3167 | 3169 |
3168 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { | 3170 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { |
3169 if (instr->is_fixed_typed_array()) { | 3171 if (instr->is_fixed_typed_array()) { |
(...skipping 2622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5792 __ push(ToRegister(instr->function())); | 5794 __ push(ToRegister(instr->function())); |
5793 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5795 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5794 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5796 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5795 } | 5797 } |
5796 | 5798 |
5797 | 5799 |
5798 #undef __ | 5800 #undef __ |
5799 | 5801 |
5800 } // namespace internal | 5802 } // namespace internal |
5801 } // namespace v8 | 5803 } // namespace v8 |
OLD | NEW |