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