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 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1497 continue; | 1497 continue; |
1498 } | 1498 } |
1499 | 1499 |
1500 if (!result_saved) { | 1500 if (!result_saved) { |
1501 __ push(r0); | 1501 __ push(r0); |
1502 result_saved = true; | 1502 result_saved = true; |
1503 } | 1503 } |
1504 VisitForAccumulatorValue(subexpr); | 1504 VisitForAccumulatorValue(subexpr); |
1505 | 1505 |
1506 // Store the subexpression value in the array's elements. | 1506 // Store the subexpression value in the array's elements. |
1507 __ ldr(r1, MemOperand(sp)); // Copy of array literal. | 1507 __ ldr(r6, MemOperand(sp)); // Copy of array literal. |
1508 __ ldr(r1, FieldMemOperand(r1, JSObject::kElementsOffset)); | 1508 __ ldr(r1, FieldMemOperand(r6, JSObject::kElementsOffset)); |
1509 int offset = FixedArray::kHeaderSize + (i * kPointerSize); | 1509 int offset = FixedArray::kHeaderSize + (i * kPointerSize); |
1510 __ str(result_register(), FieldMemOperand(r1, offset)); | 1510 __ str(result_register(), FieldMemOperand(r1, offset)); |
1511 | 1511 |
1512 Label no_map_change; | |
1513 __ JumpIfSmi(result_register(), &no_map_change); | |
1512 // Update the write barrier for the array store with r0 as the scratch | 1514 // Update the write barrier for the array store with r0 as the scratch |
1513 // register. | 1515 // register. |
1514 __ RecordWriteField( | 1516 __ RecordWriteField( |
1515 r1, offset, result_register(), r2, kLRHasBeenSaved, kDontSaveFPRegs); | 1517 r1, offset, result_register(), r2, kLRHasBeenSaved, kDontSaveFPRegs, |
1518 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); | |
1519 if (FLAG_smi_only_arrays) { | |
1520 __ ldr(r3, FieldMemOperand(r1, HeapObject::kMapOffset)); | |
1521 __ CheckFastSmiOnlyElements(r3, r2, &no_map_change); | |
1522 __ push(r6); | |
Rico
2011/09/22 17:06:07
maybe a comment here:
__ push(r6); // Copy of arr
| |
1523 __ CallRuntime(Runtime::kNonSmiElementStored, 1); | |
1524 } | |
1525 __ bind(&no_map_change); | |
1516 | 1526 |
1517 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS); | 1527 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS); |
1518 } | 1528 } |
1519 | 1529 |
1520 if (result_saved) { | 1530 if (result_saved) { |
1521 context()->PlugTOS(); | 1531 context()->PlugTOS(); |
1522 } else { | 1532 } else { |
1523 context()->Plug(r0); | 1533 context()->Plug(r0); |
1524 } | 1534 } |
1525 } | 1535 } |
(...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4256 *context_length = 0; | 4266 *context_length = 0; |
4257 return previous_; | 4267 return previous_; |
4258 } | 4268 } |
4259 | 4269 |
4260 | 4270 |
4261 #undef __ | 4271 #undef __ |
4262 | 4272 |
4263 } } // namespace v8::internal | 4273 } } // namespace v8::internal |
4264 | 4274 |
4265 #endif // V8_TARGET_ARCH_ARM | 4275 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |