| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 3222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3233 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, instr, | 3233 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, instr, |
| 3234 DeoptimizeReason::kHole); | 3234 DeoptimizeReason::kHole); |
| 3235 } | 3235 } |
| 3236 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 3236 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
| 3237 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 3237 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
| 3238 Label done; | 3238 Label done; |
| 3239 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); | 3239 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); |
| 3240 __ B(ne, &done); | 3240 __ B(ne, &done); |
| 3241 if (info()->IsStub()) { | 3241 if (info()->IsStub()) { |
| 3242 // A stub can safely convert the hole to undefined only if the array | 3242 // A stub can safely convert the hole to undefined only if the array |
| 3243 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise | 3243 // protector cell contains (Smi) Isolate::kProtectorValid. Otherwise |
| 3244 // it needs to bail out. | 3244 // it needs to bail out. |
| 3245 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); | 3245 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); |
| 3246 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset)); | 3246 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset)); |
| 3247 __ Cmp(result, Operand(Smi::FromInt(Isolate::kArrayProtectorValid))); | 3247 __ Cmp(result, Operand(Smi::FromInt(Isolate::kProtectorValid))); |
| 3248 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole); | 3248 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole); |
| 3249 } | 3249 } |
| 3250 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); | 3250 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); |
| 3251 __ Bind(&done); | 3251 __ Bind(&done); |
| 3252 } | 3252 } |
| 3253 } | 3253 } |
| 3254 | 3254 |
| 3255 | 3255 |
| 3256 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { | 3256 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
| 3257 HObjectAccess access = instr->hydrogen()->access(); | 3257 HObjectAccess access = instr->hydrogen()->access(); |
| (...skipping 2329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5587 // Index is equal to negated out of object property index plus 1. | 5587 // Index is equal to negated out of object property index plus 1. |
| 5588 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5588 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5589 __ Ldr(result, FieldMemOperand(result, | 5589 __ Ldr(result, FieldMemOperand(result, |
| 5590 FixedArray::kHeaderSize - kPointerSize)); | 5590 FixedArray::kHeaderSize - kPointerSize)); |
| 5591 __ Bind(deferred->exit()); | 5591 __ Bind(deferred->exit()); |
| 5592 __ Bind(&done); | 5592 __ Bind(&done); |
| 5593 } | 5593 } |
| 5594 | 5594 |
| 5595 } // namespace internal | 5595 } // namespace internal |
| 5596 } // namespace v8 | 5596 } // namespace v8 |
| OLD | NEW |