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 4075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4086 __ Addu(code_object, code_object, | 4086 __ Addu(code_object, code_object, |
4087 Operand(Code::kHeaderSize - kHeapObjectTag)); | 4087 Operand(Code::kHeaderSize - kHeapObjectTag)); |
4088 __ sw(code_object, | 4088 __ sw(code_object, |
4089 FieldMemOperand(function, JSFunction::kCodeEntryOffset)); | 4089 FieldMemOperand(function, JSFunction::kCodeEntryOffset)); |
4090 } | 4090 } |
4091 | 4091 |
4092 | 4092 |
4093 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { | 4093 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { |
4094 Register result = ToRegister(instr->result()); | 4094 Register result = ToRegister(instr->result()); |
4095 Register base = ToRegister(instr->base_object()); | 4095 Register base = ToRegister(instr->base_object()); |
4096 __ Addu(result, base, Operand(instr->offset())); | 4096 if (instr->offset()->IsConstantOperand()) { |
| 4097 LConstantOperand* offset = LConstantOperand::cast(instr->offset()); |
| 4098 __ Addu(result, base, Operand(ToInteger32(offset))); |
| 4099 } else { |
| 4100 Register offset = ToRegister(instr->offset()); |
| 4101 __ Addu(result, base, offset); |
| 4102 } |
4097 } | 4103 } |
4098 | 4104 |
4099 | 4105 |
4100 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { | 4106 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
4101 Representation representation = instr->representation(); | 4107 Representation representation = instr->representation(); |
4102 | 4108 |
4103 Register object = ToRegister(instr->object()); | 4109 Register object = ToRegister(instr->object()); |
4104 Register scratch = scratch0(); | 4110 Register scratch = scratch0(); |
4105 HObjectAccess access = instr->hydrogen()->access(); | 4111 HObjectAccess access = instr->hydrogen()->access(); |
4106 int offset = access.offset(); | 4112 int offset = access.offset(); |
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5869 __ Subu(scratch, result, scratch); | 5875 __ Subu(scratch, result, scratch); |
5870 __ lw(result, FieldMemOperand(scratch, | 5876 __ lw(result, FieldMemOperand(scratch, |
5871 FixedArray::kHeaderSize - kPointerSize)); | 5877 FixedArray::kHeaderSize - kPointerSize)); |
5872 __ bind(&done); | 5878 __ bind(&done); |
5873 } | 5879 } |
5874 | 5880 |
5875 | 5881 |
5876 #undef __ | 5882 #undef __ |
5877 | 5883 |
5878 } } // namespace v8::internal | 5884 } } // namespace v8::internal |
OLD | NEW |