| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // ----------- S t a t e ------------- | 149 // ----------- S t a t e ------------- |
| 150 // -- a0 : value | 150 // -- a0 : value |
| 151 // -- a1 : key | 151 // -- a1 : key |
| 152 // -- a2 : receiver | 152 // -- a2 : receiver |
| 153 // -- ra : return address | 153 // -- ra : return address |
| 154 // -- a3 : target map, scratch for subsequent call | 154 // -- a3 : target map, scratch for subsequent call |
| 155 // -- t0 : scratch (elements) | 155 // -- t0 : scratch (elements) |
| 156 // ----------------------------------- | 156 // ----------------------------------- |
| 157 if (mode == TRACK_ALLOCATION_SITE) { | 157 if (mode == TRACK_ALLOCATION_SITE) { |
| 158 ASSERT(allocation_memento_found != NULL); | 158 ASSERT(allocation_memento_found != NULL); |
| 159 masm->TestJSArrayForAllocationMemento(a2, t0, eq, | 159 __ JumpIfJSArrayHasAllocationMemento(a2, t0, allocation_memento_found); |
| 160 allocation_memento_found); | |
| 161 } | 160 } |
| 162 | 161 |
| 163 // Set transitioned map. | 162 // Set transitioned map. |
| 164 __ sw(a3, FieldMemOperand(a2, HeapObject::kMapOffset)); | 163 __ sw(a3, FieldMemOperand(a2, HeapObject::kMapOffset)); |
| 165 __ RecordWriteField(a2, | 164 __ RecordWriteField(a2, |
| 166 HeapObject::kMapOffset, | 165 HeapObject::kMapOffset, |
| 167 a3, | 166 a3, |
| 168 t5, | 167 t5, |
| 169 kRAHasNotBeenSaved, | 168 kRAHasNotBeenSaved, |
| 170 kDontSaveFPRegs, | 169 kDontSaveFPRegs, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 181 // -- a2 : receiver | 180 // -- a2 : receiver |
| 182 // -- ra : return address | 181 // -- ra : return address |
| 183 // -- a3 : target map, scratch for subsequent call | 182 // -- a3 : target map, scratch for subsequent call |
| 184 // -- t0 : scratch (elements) | 183 // -- t0 : scratch (elements) |
| 185 // ----------------------------------- | 184 // ----------------------------------- |
| 186 Label loop, entry, convert_hole, gc_required, only_change_map, done; | 185 Label loop, entry, convert_hole, gc_required, only_change_map, done; |
| 187 | 186 |
| 188 Register scratch = t6; | 187 Register scratch = t6; |
| 189 | 188 |
| 190 if (mode == TRACK_ALLOCATION_SITE) { | 189 if (mode == TRACK_ALLOCATION_SITE) { |
| 191 masm->TestJSArrayForAllocationMemento(a2, t0, eq, fail); | 190 __ JumpIfJSArrayHasAllocationMemento(a2, t0, fail); |
| 192 } | 191 } |
| 193 | 192 |
| 194 // Check for empty arrays, which only require a map transition and no changes | 193 // Check for empty arrays, which only require a map transition and no changes |
| 195 // to the backing store. | 194 // to the backing store. |
| 196 __ lw(t0, FieldMemOperand(a2, JSObject::kElementsOffset)); | 195 __ lw(t0, FieldMemOperand(a2, JSObject::kElementsOffset)); |
| 197 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); | 196 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); |
| 198 __ Branch(&only_change_map, eq, at, Operand(t0)); | 197 __ Branch(&only_change_map, eq, at, Operand(t0)); |
| 199 | 198 |
| 200 __ push(ra); | 199 __ push(ra); |
| 201 __ lw(t1, FieldMemOperand(t0, FixedArray::kLengthOffset)); | 200 __ lw(t1, FieldMemOperand(t0, FixedArray::kLengthOffset)); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // -- a0 : value | 308 // -- a0 : value |
| 310 // -- a1 : key | 309 // -- a1 : key |
| 311 // -- a2 : receiver | 310 // -- a2 : receiver |
| 312 // -- ra : return address | 311 // -- ra : return address |
| 313 // -- a3 : target map, scratch for subsequent call | 312 // -- a3 : target map, scratch for subsequent call |
| 314 // -- t0 : scratch (elements) | 313 // -- t0 : scratch (elements) |
| 315 // ----------------------------------- | 314 // ----------------------------------- |
| 316 Label entry, loop, convert_hole, gc_required, only_change_map; | 315 Label entry, loop, convert_hole, gc_required, only_change_map; |
| 317 | 316 |
| 318 if (mode == TRACK_ALLOCATION_SITE) { | 317 if (mode == TRACK_ALLOCATION_SITE) { |
| 319 masm->TestJSArrayForAllocationMemento(a2, t0, eq, fail); | 318 __ JumpIfJSArrayHasAllocationMemento(a2, t0, fail); |
| 320 } | 319 } |
| 321 | 320 |
| 322 // Check for empty arrays, which only require a map transition and no changes | 321 // Check for empty arrays, which only require a map transition and no changes |
| 323 // to the backing store. | 322 // to the backing store. |
| 324 __ lw(t0, FieldMemOperand(a2, JSObject::kElementsOffset)); | 323 __ lw(t0, FieldMemOperand(a2, JSObject::kElementsOffset)); |
| 325 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); | 324 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); |
| 326 __ Branch(&only_change_map, eq, at, Operand(t0)); | 325 __ Branch(&only_change_map, eq, at, Operand(t0)); |
| 327 | 326 |
| 328 __ MultiPush(a0.bit() | a1.bit() | a2.bit() | a3.bit() | ra.bit()); | 327 __ MultiPush(a0.bit() | a1.bit() | a2.bit() | a3.bit() | ra.bit()); |
| 329 | 328 |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); | 674 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); |
| 676 } | 675 } |
| 677 } | 676 } |
| 678 | 677 |
| 679 | 678 |
| 680 #undef __ | 679 #undef __ |
| 681 | 680 |
| 682 } } // namespace v8::internal | 681 } } // namespace v8::internal |
| 683 | 682 |
| 684 #endif // V8_TARGET_ARCH_MIPS | 683 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |