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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 3436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3447 // Check for the hole value. | 3447 // Check for the hole value. |
3448 if (instr->hydrogen()->RequiresHoleCheck()) { | 3448 if (instr->hydrogen()->RequiresHoleCheck()) { |
3449 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { | 3449 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { |
3450 __ test(result, Immediate(kSmiTagMask)); | 3450 __ test(result, Immediate(kSmiTagMask)); |
3451 DeoptimizeIf(not_equal, instr, Deoptimizer::kNotASmi); | 3451 DeoptimizeIf(not_equal, instr, Deoptimizer::kNotASmi); |
3452 } else { | 3452 } else { |
3453 __ cmp(result, factory()->the_hole_value()); | 3453 __ cmp(result, factory()->the_hole_value()); |
3454 DeoptimizeIf(equal, instr, Deoptimizer::kHole); | 3454 DeoptimizeIf(equal, instr, Deoptimizer::kHole); |
3455 } | 3455 } |
3456 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 3456 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
3457 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 3457 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS || |
| 3458 instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
3458 Label done; | 3459 Label done; |
3459 __ cmp(result, factory()->the_hole_value()); | 3460 __ cmp(result, factory()->the_hole_value()); |
3460 __ j(not_equal, &done); | 3461 __ j(not_equal, &done); |
3461 if (info()->IsStub()) { | 3462 if (info()->IsStub()) { |
3462 // A stub can safely convert the hole to undefined only if the array | 3463 // A stub can safely convert the hole to undefined only if the array |
3463 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise | 3464 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise |
3464 // it needs to bail out. | 3465 // it needs to bail out. |
3465 __ mov(result, isolate()->factory()->array_protector()); | 3466 __ mov(result, isolate()->factory()->array_protector()); |
3466 __ cmp(FieldOperand(result, PropertyCell::kValueOffset), | 3467 __ cmp(FieldOperand(result, PropertyCell::kValueOffset), |
3467 Immediate(Smi::FromInt(Isolate::kArrayProtectorValid))); | 3468 Immediate(Smi::FromInt(Isolate::kArrayProtectorValid))); |
(...skipping 2915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6383 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6384 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6384 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6385 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6385 } | 6386 } |
6386 | 6387 |
6387 | 6388 |
6388 #undef __ | 6389 #undef __ |
6389 | 6390 |
6390 } } // namespace v8::internal | 6391 } } // namespace v8::internal |
6391 | 6392 |
6392 #endif // V8_TARGET_ARCH_X87 | 6393 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |