| 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 4140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4151 { | 4151 { |
| 4152 PushSafepointRegistersScope scope(this); | 4152 PushSafepointRegistersScope scope(this); |
| 4153 if (instr->object()->IsRegister()) { | 4153 if (instr->object()->IsRegister()) { |
| 4154 __ mov(result, ToRegister(instr->object())); | 4154 __ mov(result, ToRegister(instr->object())); |
| 4155 } else { | 4155 } else { |
| 4156 __ lw(result, ToMemOperand(instr->object())); | 4156 __ lw(result, ToMemOperand(instr->object())); |
| 4157 } | 4157 } |
| 4158 | 4158 |
| 4159 LOperand* key = instr->key(); | 4159 LOperand* key = instr->key(); |
| 4160 if (key->IsConstantOperand()) { | 4160 if (key->IsConstantOperand()) { |
| 4161 __ li(a3, Operand(ToSmi(LConstantOperand::cast(key)))); | 4161 LConstantOperand* constant_key = LConstantOperand::cast(key); |
| 4162 int32_t int_key = ToInteger32(constant_key); |
| 4163 if (Smi::IsValid(int_key)) { |
| 4164 __ li(a3, Operand(Smi::FromInt(int_key))); |
| 4165 } else { |
| 4166 // We should never get here at runtime because there is a smi check on |
| 4167 // the key before this point. |
| 4168 __ stop("expected smi"); |
| 4169 } |
| 4162 } else { | 4170 } else { |
| 4163 __ mov(a3, ToRegister(key)); | 4171 __ mov(a3, ToRegister(key)); |
| 4164 __ SmiTag(a3); | 4172 __ SmiTag(a3); |
| 4165 } | 4173 } |
| 4166 | 4174 |
| 4167 GrowArrayElementsStub stub(isolate(), instr->hydrogen()->is_js_array(), | 4175 GrowArrayElementsStub stub(isolate(), instr->hydrogen()->is_js_array(), |
| 4168 instr->hydrogen()->kind()); | 4176 instr->hydrogen()->kind()); |
| 4169 __ mov(a0, result); | 4177 __ mov(a0, result); |
| 4170 __ CallStub(&stub); | 4178 __ CallStub(&stub); |
| 4171 RecordSafepointWithLazyDeopt( | 4179 RecordSafepointWithLazyDeopt( |
| (...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5554 __ lw(result, FieldMemOperand(scratch, | 5562 __ lw(result, FieldMemOperand(scratch, |
| 5555 FixedArray::kHeaderSize - kPointerSize)); | 5563 FixedArray::kHeaderSize - kPointerSize)); |
| 5556 __ bind(deferred->exit()); | 5564 __ bind(deferred->exit()); |
| 5557 __ bind(&done); | 5565 __ bind(&done); |
| 5558 } | 5566 } |
| 5559 | 5567 |
| 5560 #undef __ | 5568 #undef __ |
| 5561 | 5569 |
| 5562 } // namespace internal | 5570 } // namespace internal |
| 5563 } // namespace v8 | 5571 } // namespace v8 |
| OLD | NEW |