OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 4018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4029 MemOperand operand = MemOperand(object, offset); | 4029 MemOperand operand = MemOperand(object, offset); |
4030 __ Store(value, operand, representation); | 4030 __ Store(value, operand, representation); |
4031 return; | 4031 return; |
4032 } | 4032 } |
4033 | 4033 |
4034 Handle<Map> transition = instr->transition(); | 4034 Handle<Map> transition = instr->transition(); |
4035 SmiCheck check_needed = | 4035 SmiCheck check_needed = |
4036 instr->hydrogen()->value()->IsHeapObject() | 4036 instr->hydrogen()->value()->IsHeapObject() |
4037 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; | 4037 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
4038 | 4038 |
| 4039 ASSERT(!(representation.IsSmi() && |
| 4040 instr->value()->IsConstantOperand() && |
| 4041 !IsSmi(LConstantOperand::cast(instr->value())))); |
4039 if (representation.IsHeapObject()) { | 4042 if (representation.IsHeapObject()) { |
4040 Register value = ToRegister(instr->value()); | 4043 Register value = ToRegister(instr->value()); |
4041 if (!instr->hydrogen()->value()->type().IsHeapObject()) { | 4044 if (!instr->hydrogen()->value()->type().IsHeapObject()) { |
4042 __ SmiTst(value, scratch); | 4045 __ SmiTst(value, scratch); |
4043 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg)); | 4046 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg)); |
4044 | 4047 |
4045 // We know that value is a smi now, so we can omit the check below. | 4048 // We know that value is a smi now, so we can omit the check below. |
4046 check_needed = OMIT_SMI_CHECK; | 4049 check_needed = OMIT_SMI_CHECK; |
4047 } | 4050 } |
4048 } else if (representation.IsDouble()) { | 4051 } else if (representation.IsDouble()) { |
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5811 __ Subu(scratch, result, scratch); | 5814 __ Subu(scratch, result, scratch); |
5812 __ lw(result, FieldMemOperand(scratch, | 5815 __ lw(result, FieldMemOperand(scratch, |
5813 FixedArray::kHeaderSize - kPointerSize)); | 5816 FixedArray::kHeaderSize - kPointerSize)); |
5814 __ bind(&done); | 5817 __ bind(&done); |
5815 } | 5818 } |
5816 | 5819 |
5817 | 5820 |
5818 #undef __ | 5821 #undef __ |
5819 | 5822 |
5820 } } // namespace v8::internal | 5823 } } // namespace v8::internal |
OLD | NEW |