OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3356 int offset = | 3356 int offset = |
3357 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize; | 3357 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize; |
3358 __ str(value, FieldMemOperand(elements, offset)); | 3358 __ str(value, FieldMemOperand(elements, offset)); |
3359 } else { | 3359 } else { |
3360 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2)); | 3360 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2)); |
3361 __ str(value, FieldMemOperand(scratch, FixedArray::kHeaderSize)); | 3361 __ str(value, FieldMemOperand(scratch, FixedArray::kHeaderSize)); |
3362 } | 3362 } |
3363 | 3363 |
3364 if (instr->hydrogen()->NeedsWriteBarrier()) { | 3364 if (instr->hydrogen()->NeedsWriteBarrier()) { |
3365 // Compute address of modified element and store it into key register. | 3365 // Compute address of modified element and store it into key register. |
3366 __ add(key, scratch, Operand(FixedArray::kHeaderSize)); | 3366 __ add(key, scratch, Operand(FixedArray::kHeaderSize - 1)); |
Erik Corry
2011/10/05 10:48:20
Instead of 1 how about kHeapObjectTag?
| |
3367 __ RecordWrite(elements, key, value, kLRHasBeenSaved, kSaveFPRegs); | 3367 __ RecordWrite(elements, key, value, kLRHasBeenSaved, kSaveFPRegs); |
3368 } | 3368 } |
3369 } | 3369 } |
3370 | 3370 |
3371 | 3371 |
3372 void LCodeGen::DoStoreKeyedFastDoubleElement( | 3372 void LCodeGen::DoStoreKeyedFastDoubleElement( |
3373 LStoreKeyedFastDoubleElement* instr) { | 3373 LStoreKeyedFastDoubleElement* instr) { |
3374 DwVfpRegister value = ToDoubleRegister(instr->value()); | 3374 DwVfpRegister value = ToDoubleRegister(instr->value()); |
3375 Register elements = ToRegister(instr->elements()); | 3375 Register elements = ToRegister(instr->elements()); |
3376 Register key = no_reg; | 3376 Register key = no_reg; |
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4566 ASSERT(osr_pc_offset_ == -1); | 4566 ASSERT(osr_pc_offset_ == -1); |
4567 osr_pc_offset_ = masm()->pc_offset(); | 4567 osr_pc_offset_ = masm()->pc_offset(); |
4568 } | 4568 } |
4569 | 4569 |
4570 | 4570 |
4571 | 4571 |
4572 | 4572 |
4573 #undef __ | 4573 #undef __ |
4574 | 4574 |
4575 } } // namespace v8::internal | 4575 } } // namespace v8::internal |
OLD | NEW |