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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" | 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 2888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2899 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 2899 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
2900 Label done; | 2900 Label done; |
2901 __ cmp(result, factory()->the_hole_value()); | 2901 __ cmp(result, factory()->the_hole_value()); |
2902 __ j(not_equal, &done); | 2902 __ j(not_equal, &done); |
2903 if (info()->IsStub()) { | 2903 if (info()->IsStub()) { |
2904 // A stub can safely convert the hole to undefined only if the array | 2904 // A stub can safely convert the hole to undefined only if the array |
2905 // protector cell contains (Smi) Isolate::kArrayProtectorValid. | 2905 // protector cell contains (Smi) Isolate::kArrayProtectorValid. |
2906 // Otherwise it needs to bail out. | 2906 // Otherwise it needs to bail out. |
2907 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); | 2907 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); |
2908 __ cmp(FieldOperand(result, PropertyCell::kValueOffset), | 2908 __ cmp(FieldOperand(result, PropertyCell::kValueOffset), |
2909 Immediate(Smi::FromInt(Isolate::kArrayProtectorValid))); | 2909 Immediate(Smi::FromInt(Isolate::kProtectorValid))); |
2910 DeoptimizeIf(not_equal, instr, DeoptimizeReason::kHole); | 2910 DeoptimizeIf(not_equal, instr, DeoptimizeReason::kHole); |
2911 } | 2911 } |
2912 __ mov(result, isolate()->factory()->undefined_value()); | 2912 __ mov(result, isolate()->factory()->undefined_value()); |
2913 __ bind(&done); | 2913 __ bind(&done); |
2914 } | 2914 } |
2915 } | 2915 } |
2916 | 2916 |
2917 | 2917 |
2918 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { | 2918 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { |
2919 if (instr->is_fixed_typed_array()) { | 2919 if (instr->is_fixed_typed_array()) { |
(...skipping 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5641 __ bind(deferred->exit()); | 5641 __ bind(deferred->exit()); |
5642 __ bind(&done); | 5642 __ bind(&done); |
5643 } | 5643 } |
5644 | 5644 |
5645 #undef __ | 5645 #undef __ |
5646 | 5646 |
5647 } // namespace internal | 5647 } // namespace internal |
5648 } // namespace v8 | 5648 } // namespace v8 |
5649 | 5649 |
5650 #endif // V8_TARGET_ARCH_X87 | 5650 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |