| 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 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1815 | 1815 |
| 1816 | 1816 |
| 1817 void LCodeGen::DoConstantD(LConstantD* instr) { | 1817 void LCodeGen::DoConstantD(LConstantD* instr) { |
| 1818 ASSERT(instr->result()->IsDoubleRegister()); | 1818 ASSERT(instr->result()->IsDoubleRegister()); |
| 1819 DwVfpRegister result = ToDoubleRegister(instr->result()); | 1819 DwVfpRegister result = ToDoubleRegister(instr->result()); |
| 1820 double v = instr->value(); | 1820 double v = instr->value(); |
| 1821 __ Vmov(result, v, scratch0()); | 1821 __ Vmov(result, v, scratch0()); |
| 1822 } | 1822 } |
| 1823 | 1823 |
| 1824 | 1824 |
| 1825 void LCodeGen::DoConstantE(LConstantE* instr) { |
| 1826 __ mov(ToRegister(instr->result()), Operand(instr->value())); |
| 1827 } |
| 1828 |
| 1829 |
| 1825 void LCodeGen::DoConstantT(LConstantT* instr) { | 1830 void LCodeGen::DoConstantT(LConstantT* instr) { |
| 1826 Handle<Object> value = instr->value(); | 1831 Handle<Object> value = instr->value(); |
| 1827 AllowDeferredHandleDereference smi_check; | 1832 AllowDeferredHandleDereference smi_check; |
| 1828 __ LoadObject(ToRegister(instr->result()), value); | 1833 __ LoadObject(ToRegister(instr->result()), value); |
| 1829 } | 1834 } |
| 1830 | 1835 |
| 1831 | 1836 |
| 1832 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { | 1837 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { |
| 1833 Register result = ToRegister(instr->result()); | 1838 Register result = ToRegister(instr->result()); |
| 1834 Register map = ToRegister(instr->value()); | 1839 Register map = ToRegister(instr->value()); |
| (...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2995 } | 3000 } |
| 2996 | 3001 |
| 2997 __ bind(&skip_assignment); | 3002 __ bind(&skip_assignment); |
| 2998 } | 3003 } |
| 2999 | 3004 |
| 3000 | 3005 |
| 3001 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { | 3006 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
| 3002 HObjectAccess access = instr->hydrogen()->access(); | 3007 HObjectAccess access = instr->hydrogen()->access(); |
| 3003 int offset = access.offset(); | 3008 int offset = access.offset(); |
| 3004 Register object = ToRegister(instr->object()); | 3009 Register object = ToRegister(instr->object()); |
| 3010 |
| 3011 if (access.IsExternalMemory()) { |
| 3012 Register result = ToRegister(instr->result()); |
| 3013 __ ldr(result, MemOperand(object, offset)); |
| 3014 return; |
| 3015 } |
| 3016 |
| 3005 if (instr->hydrogen()->representation().IsDouble()) { | 3017 if (instr->hydrogen()->representation().IsDouble()) { |
| 3006 DwVfpRegister result = ToDoubleRegister(instr->result()); | 3018 DwVfpRegister result = ToDoubleRegister(instr->result()); |
| 3007 __ vldr(result, FieldMemOperand(object, offset)); | 3019 __ vldr(result, FieldMemOperand(object, offset)); |
| 3008 return; | 3020 return; |
| 3009 } | 3021 } |
| 3010 | 3022 |
| 3011 Register result = ToRegister(instr->result()); | 3023 Register result = ToRegister(instr->result()); |
| 3012 if (access.IsInobject()) { | 3024 if (access.IsInobject()) { |
| 3013 __ ldr(result, FieldMemOperand(object, offset)); | 3025 __ ldr(result, FieldMemOperand(object, offset)); |
| 3014 } else { | 3026 } else { |
| (...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4174 Register base = ToRegister(instr->base_object()); | 4186 Register base = ToRegister(instr->base_object()); |
| 4175 __ add(result, base, Operand(instr->offset())); | 4187 __ add(result, base, Operand(instr->offset())); |
| 4176 } | 4188 } |
| 4177 | 4189 |
| 4178 | 4190 |
| 4179 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { | 4191 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
| 4180 Representation representation = instr->representation(); | 4192 Representation representation = instr->representation(); |
| 4181 | 4193 |
| 4182 Register object = ToRegister(instr->object()); | 4194 Register object = ToRegister(instr->object()); |
| 4183 Register scratch = scratch0(); | 4195 Register scratch = scratch0(); |
| 4184 | |
| 4185 HObjectAccess access = instr->hydrogen()->access(); | 4196 HObjectAccess access = instr->hydrogen()->access(); |
| 4186 int offset = access.offset(); | 4197 int offset = access.offset(); |
| 4187 | 4198 |
| 4199 if (access.IsExternalMemory()) { |
| 4200 Register value = ToRegister(instr->value()); |
| 4201 __ str(value, MemOperand(object, offset)); |
| 4202 return; |
| 4203 } |
| 4204 |
| 4188 Handle<Map> transition = instr->transition(); | 4205 Handle<Map> transition = instr->transition(); |
| 4189 | 4206 |
| 4190 if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { | 4207 if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
| 4191 Register value = ToRegister(instr->value()); | 4208 Register value = ToRegister(instr->value()); |
| 4192 if (!instr->hydrogen()->value()->type().IsHeapObject()) { | 4209 if (!instr->hydrogen()->value()->type().IsHeapObject()) { |
| 4193 __ SmiTst(value); | 4210 __ SmiTst(value); |
| 4194 DeoptimizeIf(eq, instr->environment()); | 4211 DeoptimizeIf(eq, instr->environment()); |
| 4195 } | 4212 } |
| 4196 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 4213 } else if (FLAG_track_double_fields && representation.IsDouble()) { |
| 4197 ASSERT(transition.is_null()); | 4214 ASSERT(transition.is_null()); |
| (...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5819 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5836 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 5820 __ ldr(result, FieldMemOperand(scratch, | 5837 __ ldr(result, FieldMemOperand(scratch, |
| 5821 FixedArray::kHeaderSize - kPointerSize)); | 5838 FixedArray::kHeaderSize - kPointerSize)); |
| 5822 __ bind(&done); | 5839 __ bind(&done); |
| 5823 } | 5840 } |
| 5824 | 5841 |
| 5825 | 5842 |
| 5826 #undef __ | 5843 #undef __ |
| 5827 | 5844 |
| 5828 } } // namespace v8::internal | 5845 } } // namespace v8::internal |
| OLD | NEW |