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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 2807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2818 } else if (hinstr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 2818 } else if (hinstr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
2819 DCHECK(hinstr->elements_kind() == FAST_HOLEY_ELEMENTS); | 2819 DCHECK(hinstr->elements_kind() == FAST_HOLEY_ELEMENTS); |
2820 Label done; | 2820 Label done; |
2821 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); | 2821 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); |
2822 __ j(not_equal, &done); | 2822 __ j(not_equal, &done); |
2823 if (info()->IsStub()) { | 2823 if (info()->IsStub()) { |
2824 // A stub can safely convert the hole to undefined only if the array | 2824 // A stub can safely convert the hole to undefined only if the array |
2825 // protector cell contains (Smi) Isolate::kProtectorValid. Otherwise | 2825 // protector cell contains (Smi) Isolate::kProtectorValid. Otherwise |
2826 // it needs to bail out. | 2826 // it needs to bail out. |
2827 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); | 2827 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); |
2828 __ Cmp(FieldOperand(result, Cell::kValueOffset), | 2828 __ Cmp(FieldOperand(result, PropertyCell::kValueOffset), |
2829 Smi::FromInt(Isolate::kProtectorValid)); | 2829 Smi::FromInt(Isolate::kProtectorValid)); |
2830 DeoptimizeIf(not_equal, instr, DeoptimizeReason::kHole); | 2830 DeoptimizeIf(not_equal, instr, DeoptimizeReason::kHole); |
2831 } | 2831 } |
2832 __ Move(result, isolate()->factory()->undefined_value()); | 2832 __ Move(result, isolate()->factory()->undefined_value()); |
2833 __ bind(&done); | 2833 __ bind(&done); |
2834 } | 2834 } |
2835 } | 2835 } |
2836 | 2836 |
2837 | 2837 |
2838 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { | 2838 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { |
(...skipping 2590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5429 __ bind(deferred->exit()); | 5429 __ bind(deferred->exit()); |
5430 __ bind(&done); | 5430 __ bind(&done); |
5431 } | 5431 } |
5432 | 5432 |
5433 #undef __ | 5433 #undef __ |
5434 | 5434 |
5435 } // namespace internal | 5435 } // namespace internal |
5436 } // namespace v8 | 5436 } // namespace v8 |
5437 | 5437 |
5438 #endif // V8_TARGET_ARCH_X64 | 5438 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |