| 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 3954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3965 Register function = ToRegister(instr->function()); | 3965 Register function = ToRegister(instr->function()); |
| 3966 Register code_object = ToRegister(instr->code_object()); | 3966 Register code_object = ToRegister(instr->code_object()); |
| 3967 __ lea(code_object, FieldOperand(code_object, Code::kHeaderSize)); | 3967 __ lea(code_object, FieldOperand(code_object, Code::kHeaderSize)); |
| 3968 __ movq(FieldOperand(function, JSFunction::kCodeEntryOffset), code_object); | 3968 __ movq(FieldOperand(function, JSFunction::kCodeEntryOffset), code_object); |
| 3969 } | 3969 } |
| 3970 | 3970 |
| 3971 | 3971 |
| 3972 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { | 3972 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { |
| 3973 Register result = ToRegister(instr->result()); | 3973 Register result = ToRegister(instr->result()); |
| 3974 Register base = ToRegister(instr->base_object()); | 3974 Register base = ToRegister(instr->base_object()); |
| 3975 __ lea(result, Operand(base, instr->offset())); | 3975 if (instr->offset()->IsConstantOperand()) { |
| 3976 LConstantOperand* offset = LConstantOperand::cast(instr->offset()); |
| 3977 __ lea(result, Operand(base, ToInteger32(offset))); |
| 3978 } else { |
| 3979 Register offset = ToRegister(instr->offset()); |
| 3980 __ lea(result, Operand(base, offset, times_1, 0)); |
| 3981 } |
| 3976 } | 3982 } |
| 3977 | 3983 |
| 3978 | 3984 |
| 3979 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { | 3985 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
| 3980 Representation representation = instr->representation(); | 3986 Representation representation = instr->representation(); |
| 3981 | 3987 |
| 3982 HObjectAccess access = instr->hydrogen()->access(); | 3988 HObjectAccess access = instr->hydrogen()->access(); |
| 3983 int offset = access.offset(); | 3989 int offset = access.offset(); |
| 3984 | 3990 |
| 3985 if (access.IsExternalMemory()) { | 3991 if (access.IsExternalMemory()) { |
| (...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5639 FixedArray::kHeaderSize - kPointerSize)); | 5645 FixedArray::kHeaderSize - kPointerSize)); |
| 5640 __ bind(&done); | 5646 __ bind(&done); |
| 5641 } | 5647 } |
| 5642 | 5648 |
| 5643 | 5649 |
| 5644 #undef __ | 5650 #undef __ |
| 5645 | 5651 |
| 5646 } } // namespace v8::internal | 5652 } } // namespace v8::internal |
| 5647 | 5653 |
| 5648 #endif // V8_TARGET_ARCH_X64 | 5654 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |