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 2980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2991 __ cmp(result, factory()->the_hole_value()); | 2991 __ cmp(result, factory()->the_hole_value()); |
2992 DeoptimizeIf(equal, instr, Deoptimizer::kHole); | 2992 DeoptimizeIf(equal, instr, Deoptimizer::kHole); |
2993 } | 2993 } |
2994 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 2994 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
2995 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 2995 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
2996 Label done; | 2996 Label done; |
2997 __ cmp(result, factory()->the_hole_value()); | 2997 __ cmp(result, factory()->the_hole_value()); |
2998 __ j(not_equal, &done); | 2998 __ j(not_equal, &done); |
2999 if (info()->IsStub()) { | 2999 if (info()->IsStub()) { |
3000 // A stub can safely convert the hole to undefined only if the array | 3000 // A stub can safely convert the hole to undefined only if the array |
3001 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise | 3001 // protector cell contains (Smi) Isolate::kArrayProtectorValid. |
3002 // it needs to bail out. | 3002 // Otherwise it needs to bail out. |
3003 __ mov(result, isolate()->factory()->array_protector()); | 3003 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); |
3004 __ cmp(FieldOperand(result, PropertyCell::kValueOffset), | 3004 __ cmp(FieldOperand(result, PropertyCell::kValueOffset), |
3005 Immediate(Smi::FromInt(Isolate::kArrayProtectorValid))); | 3005 Immediate(Smi::FromInt(Isolate::kArrayProtectorValid))); |
3006 DeoptimizeIf(not_equal, instr, Deoptimizer::kHole); | 3006 DeoptimizeIf(not_equal, instr, Deoptimizer::kHole); |
3007 } | 3007 } |
3008 __ mov(result, isolate()->factory()->undefined_value()); | 3008 __ mov(result, isolate()->factory()->undefined_value()); |
3009 __ bind(&done); | 3009 __ bind(&done); |
3010 } | 3010 } |
3011 } | 3011 } |
3012 | 3012 |
3013 | 3013 |
(...skipping 2813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5827 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context); | 5827 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context); |
5828 } | 5828 } |
5829 | 5829 |
5830 | 5830 |
5831 #undef __ | 5831 #undef __ |
5832 | 5832 |
5833 } // namespace internal | 5833 } // namespace internal |
5834 } // namespace v8 | 5834 } // namespace v8 |
5835 | 5835 |
5836 #endif // V8_TARGET_ARCH_X87 | 5836 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |