| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 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 3168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3179 // Check for the hole value. | 3179 // Check for the hole value. |
| 3180 if (instr->hydrogen()->RequiresHoleCheck()) { | 3180 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 3181 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { | 3181 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { |
| 3182 __ test(result, Immediate(kSmiTagMask)); | 3182 __ test(result, Immediate(kSmiTagMask)); |
| 3183 DeoptimizeIf(not_equal, instr, Deoptimizer::kNotASmi); | 3183 DeoptimizeIf(not_equal, instr, Deoptimizer::kNotASmi); |
| 3184 } else { | 3184 } else { |
| 3185 __ cmp(result, factory()->the_hole_value()); | 3185 __ cmp(result, factory()->the_hole_value()); |
| 3186 DeoptimizeIf(equal, instr, Deoptimizer::kHole); | 3186 DeoptimizeIf(equal, instr, Deoptimizer::kHole); |
| 3187 } | 3187 } |
| 3188 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 3188 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
| 3189 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 3189 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS || |
| 3190 instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
| 3190 Label done; | 3191 Label done; |
| 3191 __ cmp(result, factory()->the_hole_value()); | 3192 __ cmp(result, factory()->the_hole_value()); |
| 3192 __ j(not_equal, &done); | 3193 __ j(not_equal, &done); |
| 3193 if (info()->IsStub()) { | 3194 if (info()->IsStub()) { |
| 3194 // A stub can safely convert the hole to undefined only if the array | 3195 // A stub can safely convert the hole to undefined only if the array |
| 3195 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise | 3196 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise |
| 3196 // it needs to bail out. | 3197 // it needs to bail out. |
| 3197 __ mov(result, isolate()->factory()->array_protector()); | 3198 __ mov(result, isolate()->factory()->array_protector()); |
| 3198 __ cmp(FieldOperand(result, PropertyCell::kValueOffset), | 3199 __ cmp(FieldOperand(result, PropertyCell::kValueOffset), |
| 3199 Immediate(Smi::FromInt(Isolate::kArrayProtectorValid))); | 3200 Immediate(Smi::FromInt(Isolate::kArrayProtectorValid))); |
| (...skipping 2574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5774 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5775 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5775 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5776 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5776 } | 5777 } |
| 5777 | 5778 |
| 5778 | 5779 |
| 5779 #undef __ | 5780 #undef __ |
| 5780 | 5781 |
| 5781 } } // namespace v8::internal | 5782 } } // namespace v8::internal |
| 5782 | 5783 |
| 5783 #endif // V8_TARGET_ARCH_IA32 | 5784 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |