| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 4588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4599 __ Integer32ToSmi(input, input); | 4599 __ Integer32ToSmi(input, input); |
| 4600 } | 4600 } |
| 4601 | 4601 |
| 4602 | 4602 |
| 4603 void LCodeGen::DoSmiUntag(LSmiUntag* instr) { | 4603 void LCodeGen::DoSmiUntag(LSmiUntag* instr) { |
| 4604 ASSERT(instr->value()->Equals(instr->result())); | 4604 ASSERT(instr->value()->Equals(instr->result())); |
| 4605 Register input = ToRegister(instr->value()); | 4605 Register input = ToRegister(instr->value()); |
| 4606 if (instr->needs_check()) { | 4606 if (instr->needs_check()) { |
| 4607 Condition is_smi = __ CheckSmi(input); | 4607 Condition is_smi = __ CheckSmi(input); |
| 4608 DeoptimizeIf(NegateCondition(is_smi), instr->environment()); | 4608 DeoptimizeIf(NegateCondition(is_smi), instr->environment()); |
| 4609 } else if (instr->hydrogen()->value()->IsLoadKeyed()) { |
| 4610 HLoadKeyed* load = HLoadKeyed::cast(instr->hydrogen()->value()); |
| 4611 if (load->UsesMustHandleHole()) { |
| 4612 Condition cc = masm()->CheckSmi(input); |
| 4613 if (load->hole_mode() == ALLOW_RETURN_HOLE) { |
| 4614 Label done; |
| 4615 __ j(cc, &done); |
| 4616 __ xor_(input, input); |
| 4617 __ bind(&done); |
| 4618 } else { |
| 4619 DeoptimizeIf(NegateCondition(cc), instr->environment()); |
| 4620 } |
| 4621 } else { |
| 4622 __ AssertSmi(input); |
| 4623 } |
| 4609 } else { | 4624 } else { |
| 4610 __ AssertSmi(input); | 4625 __ AssertSmi(input); |
| 4611 } | 4626 } |
| 4612 __ SmiToInteger32(input, input); | 4627 __ SmiToInteger32(input, input); |
| 4613 } | 4628 } |
| 4614 | 4629 |
| 4615 | 4630 |
| 4616 void LCodeGen::EmitNumberUntagD(Register input_reg, | 4631 void LCodeGen::EmitNumberUntagD(Register input_reg, |
| 4617 XMMRegister result_reg, | 4632 XMMRegister result_reg, |
| 4618 bool deoptimize_on_undefined, | 4633 bool deoptimize_on_undefined, |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5605 FixedArray::kHeaderSize - kPointerSize)); | 5620 FixedArray::kHeaderSize - kPointerSize)); |
| 5606 __ bind(&done); | 5621 __ bind(&done); |
| 5607 } | 5622 } |
| 5608 | 5623 |
| 5609 | 5624 |
| 5610 #undef __ | 5625 #undef __ |
| 5611 | 5626 |
| 5612 } } // namespace v8::internal | 5627 } } // namespace v8::internal |
| 5613 | 5628 |
| 5614 #endif // V8_TARGET_ARCH_X64 | 5629 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |