| 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 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1485 increment_stack_height(); | 1485 increment_stack_height(); |
| 1486 } | 1486 } |
| 1487 VisitForAccumulatorValue(subexpr); | 1487 VisitForAccumulatorValue(subexpr); |
| 1488 | 1488 |
| 1489 // Store the subexpression value in the array's elements. | 1489 // Store the subexpression value in the array's elements. |
| 1490 __ mov(ebx, Operand(esp, 0)); // Copy of array literal. | 1490 __ mov(ebx, Operand(esp, 0)); // Copy of array literal. |
| 1491 __ mov(ebx, FieldOperand(ebx, JSObject::kElementsOffset)); | 1491 __ mov(ebx, FieldOperand(ebx, JSObject::kElementsOffset)); |
| 1492 int offset = FixedArray::kHeaderSize + (i * kPointerSize); | 1492 int offset = FixedArray::kHeaderSize + (i * kPointerSize); |
| 1493 __ mov(FieldOperand(ebx, offset), result_register()); | 1493 __ mov(FieldOperand(ebx, offset), result_register()); |
| 1494 | 1494 |
| 1495 Label no_map_change; |
| 1496 __ JumpIfSmi(result_register(), &no_map_change); |
| 1495 // Update the write barrier for the array store. | 1497 // Update the write barrier for the array store. |
| 1496 __ RecordWriteField(ebx, offset, result_register(), ecx, kDontSaveFPRegs); | 1498 __ RecordWriteField(ebx, offset, result_register(), ecx, |
| 1499 kDontSaveFPRegs, |
| 1500 EMIT_REMEMBERED_SET, |
| 1501 OMIT_SMI_CHECK); |
| 1502 if (FLAG_smi_only_arrays) { |
| 1503 __ mov(edi, FieldOperand(ebx, JSObject::kMapOffset)); |
| 1504 __ CheckFastSmiOnlyElements(edi, &no_map_change, Label::kNear); |
| 1505 __ push(Operand(esp, 0)); |
| 1506 __ CallRuntime(Runtime::kNonSmiElementStored, 1); |
| 1507 } |
| 1508 __ bind(&no_map_change); |
| 1497 | 1509 |
| 1498 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS); | 1510 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS); |
| 1499 } | 1511 } |
| 1500 | 1512 |
| 1501 if (result_saved) { | 1513 if (result_saved) { |
| 1502 context()->PlugTOS(); | 1514 context()->PlugTOS(); |
| 1503 } else { | 1515 } else { |
| 1504 context()->Plug(eax); | 1516 context()->Plug(eax); |
| 1505 } | 1517 } |
| 1506 } | 1518 } |
| (...skipping 2803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4310 *context_length = 0; | 4322 *context_length = 0; |
| 4311 return previous_; | 4323 return previous_; |
| 4312 } | 4324 } |
| 4313 | 4325 |
| 4314 | 4326 |
| 4315 #undef __ | 4327 #undef __ |
| 4316 | 4328 |
| 4317 } } // namespace v8::internal | 4329 } } // namespace v8::internal |
| 4318 | 4330 |
| 4319 #endif // V8_TARGET_ARCH_IA32 | 4331 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |