OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2631 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); | 2631 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
2632 LConstantOperand* const_operand = LConstantOperand::cast(instr->key()); | 2632 LConstantOperand* const_operand = LConstantOperand::cast(instr->key()); |
2633 int offset = | 2633 int offset = |
2634 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize; | 2634 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize; |
2635 __ mov(FieldOperand(elements, offset), value); | 2635 __ mov(FieldOperand(elements, offset), value); |
2636 } else { | 2636 } else { |
2637 __ mov(FieldOperand(elements, key, times_4, FixedArray::kHeaderSize), | 2637 __ mov(FieldOperand(elements, key, times_4, FixedArray::kHeaderSize), |
2638 value); | 2638 value); |
2639 } | 2639 } |
2640 | 2640 |
2641 // Update the write barrier unless we're certain that we're storing a smi. | |
2642 if (instr->hydrogen()->NeedsWriteBarrier()) { | 2641 if (instr->hydrogen()->NeedsWriteBarrier()) { |
2643 // Compute address of modified element and store it into key register. | 2642 // Compute address of modified element and store it into key register. |
2644 __ lea(key, FieldOperand(elements, key, times_4, FixedArray::kHeaderSize)); | 2643 __ lea(key, FieldOperand(elements, key, times_4, FixedArray::kHeaderSize)); |
2645 __ RecordWrite(elements, key, value); | 2644 __ RecordWrite(elements, key, value); |
2646 } | 2645 } |
2647 } | 2646 } |
2648 | 2647 |
2649 | 2648 |
2650 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { | 2649 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { |
2651 ASSERT(ToRegister(instr->object()).is(edx)); | 2650 ASSERT(ToRegister(instr->object()).is(edx)); |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3404 ASSERT(!environment->HasBeenRegistered()); | 3403 ASSERT(!environment->HasBeenRegistered()); |
3405 RegisterEnvironmentForDeoptimization(environment); | 3404 RegisterEnvironmentForDeoptimization(environment); |
3406 ASSERT(osr_pc_offset_ == -1); | 3405 ASSERT(osr_pc_offset_ == -1); |
3407 osr_pc_offset_ = masm()->pc_offset(); | 3406 osr_pc_offset_ = masm()->pc_offset(); |
3408 } | 3407 } |
3409 | 3408 |
3410 | 3409 |
3411 #undef __ | 3410 #undef __ |
3412 | 3411 |
3413 } } // namespace v8::internal | 3412 } } // namespace v8::internal |
OLD | NEW |