OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4026 MemOperand operand = MemOperand(object, offset); | 4026 MemOperand operand = MemOperand(object, offset); |
4027 __ Store(value, operand, representation); | 4027 __ Store(value, operand, representation); |
4028 return; | 4028 return; |
4029 } | 4029 } |
4030 | 4030 |
4031 Handle<Map> transition = instr->transition(); | 4031 Handle<Map> transition = instr->transition(); |
4032 SmiCheck check_needed = | 4032 SmiCheck check_needed = |
4033 instr->hydrogen()->value()->IsHeapObject() | 4033 instr->hydrogen()->value()->IsHeapObject() |
4034 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; | 4034 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
4035 | 4035 |
| 4036 ASSERT(!(representation.IsSmi() && |
| 4037 instr->value()->IsConstantOperand() && |
| 4038 !IsSmi(LConstantOperand::cast(instr->value())))); |
4036 if (representation.IsHeapObject()) { | 4039 if (representation.IsHeapObject()) { |
4037 Register value = ToRegister(instr->value()); | 4040 Register value = ToRegister(instr->value()); |
4038 if (!instr->hydrogen()->value()->type().IsHeapObject()) { | 4041 if (!instr->hydrogen()->value()->type().IsHeapObject()) { |
4039 __ SmiTst(value); | 4042 __ SmiTst(value); |
4040 DeoptimizeIf(eq, instr->environment()); | 4043 DeoptimizeIf(eq, instr->environment()); |
4041 | 4044 |
4042 // We know that value is a smi now, so we can omit the check below. | 4045 // We know that value is a smi now, so we can omit the check below. |
4043 check_needed = OMIT_SMI_CHECK; | 4046 check_needed = OMIT_SMI_CHECK; |
4044 } | 4047 } |
4045 } else if (representation.IsDouble()) { | 4048 } else if (representation.IsDouble()) { |
(...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5735 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5738 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5736 __ ldr(result, FieldMemOperand(scratch, | 5739 __ ldr(result, FieldMemOperand(scratch, |
5737 FixedArray::kHeaderSize - kPointerSize)); | 5740 FixedArray::kHeaderSize - kPointerSize)); |
5738 __ bind(&done); | 5741 __ bind(&done); |
5739 } | 5742 } |
5740 | 5743 |
5741 | 5744 |
5742 #undef __ | 5745 #undef __ |
5743 | 5746 |
5744 } } // namespace v8::internal | 5747 } } // namespace v8::internal |
OLD | NEW |