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 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1460 int offset = FixedArray::kHeaderSize + (i * kPointerSize); | 1460 int offset = FixedArray::kHeaderSize + (i * kPointerSize); |
1461 __ movq(FieldOperand(rbx, offset), result_register()); | 1461 __ movq(FieldOperand(rbx, offset), result_register()); |
1462 | 1462 |
1463 Label no_map_change; | 1463 Label no_map_change; |
1464 __ JumpIfSmi(result_register(), &no_map_change); | 1464 __ JumpIfSmi(result_register(), &no_map_change); |
1465 // Update the write barrier for the array store. | 1465 // Update the write barrier for the array store. |
1466 __ RecordWriteField(rbx, offset, result_register(), rcx, | 1466 __ RecordWriteField(rbx, offset, result_register(), rcx, |
1467 kDontSaveFPRegs, | 1467 kDontSaveFPRegs, |
1468 EMIT_REMEMBERED_SET, | 1468 EMIT_REMEMBERED_SET, |
1469 OMIT_SMI_CHECK); | 1469 OMIT_SMI_CHECK); |
1470 if (FLAG_smi_only_arrays) { | 1470 __ movq(rdi, FieldOperand(rbx, JSObject::kMapOffset)); |
1471 __ movq(rdi, FieldOperand(rbx, JSObject::kMapOffset)); | 1471 __ CheckFastSmiOnlyElements(rdi, &no_map_change, Label::kNear); |
1472 __ CheckFastSmiOnlyElements(rdi, &no_map_change, Label::kNear); | 1472 __ push(r8); |
1473 __ push(r8); | 1473 __ CallRuntime(Runtime::kNonSmiElementStored, 1); |
1474 __ CallRuntime(Runtime::kNonSmiElementStored, 1); | |
1475 } | |
1476 __ bind(&no_map_change); | 1474 __ bind(&no_map_change); |
1477 | 1475 |
1478 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS); | 1476 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS); |
1479 } | 1477 } |
1480 | 1478 |
1481 if (result_saved) { | 1479 if (result_saved) { |
1482 context()->PlugTOS(); | 1480 context()->PlugTOS(); |
1483 } else { | 1481 } else { |
1484 context()->Plug(rax); | 1482 context()->Plug(rax); |
1485 } | 1483 } |
(...skipping 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4196 *context_length = 0; | 4194 *context_length = 0; |
4197 return previous_; | 4195 return previous_; |
4198 } | 4196 } |
4199 | 4197 |
4200 | 4198 |
4201 #undef __ | 4199 #undef __ |
4202 | 4200 |
4203 } } // namespace v8::internal | 4201 } } // namespace v8::internal |
4204 | 4202 |
4205 #endif // V8_TARGET_ARCH_X64 | 4203 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |