| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1496 // Save new length. | 1496 // Save new length. |
| 1497 __ mov(FieldOperand(edx, JSArray::kLengthOffset), eax); | 1497 __ mov(FieldOperand(edx, JSArray::kLengthOffset), eax); |
| 1498 | 1498 |
| 1499 // Push the element. | 1499 // Push the element. |
| 1500 __ lea(edx, FieldOperand(ebx, | 1500 __ lea(edx, FieldOperand(ebx, |
| 1501 eax, times_half_pointer_size, | 1501 eax, times_half_pointer_size, |
| 1502 FixedArray::kHeaderSize - argc * kPointerSize)); | 1502 FixedArray::kHeaderSize - argc * kPointerSize)); |
| 1503 __ mov(ecx, Operand(esp, argc * kPointerSize)); | 1503 __ mov(ecx, Operand(esp, argc * kPointerSize)); |
| 1504 __ mov(Operand(edx, 0), ecx); | 1504 __ mov(Operand(edx, 0), ecx); |
| 1505 | 1505 |
| 1506 // Check if value is a smi. | 1506 if (!FLAG_new_gc) { |
| 1507 __ test(ecx, Immediate(kSmiTagMask)); | 1507 // Check if value is a smi. |
| 1508 __ j(not_zero, &with_write_barrier); | 1508 __ test(ecx, Immediate(kSmiTagMask)); |
| 1509 __ j(not_zero, &with_write_barrier); |
| 1510 } |
| 1509 | 1511 |
| 1510 __ bind(&exit); | 1512 __ bind(&exit); |
| 1511 __ ret((argc + 1) * kPointerSize); | 1513 __ ret((argc + 1) * kPointerSize); |
| 1512 | 1514 |
| 1513 __ bind(&with_write_barrier); | 1515 if (!FLAG_new_gc) { |
| 1516 __ bind(&with_write_barrier); |
| 1514 | 1517 |
| 1515 __ InNewSpace(ebx, ecx, equal, &exit); | 1518 __ InNewSpace(ebx, ecx, equal, &exit); |
| 1516 | 1519 |
| 1517 __ RecordWriteHelper(ebx, edx, ecx); | 1520 __ RecordWriteHelper(ebx, edx, ecx); |
| 1518 __ ret((argc + 1) * kPointerSize); | 1521 __ ret((argc + 1) * kPointerSize); |
| 1522 } |
| 1519 | 1523 |
| 1520 __ bind(&attempt_to_grow_elements); | 1524 __ bind(&attempt_to_grow_elements); |
| 1521 if (!FLAG_inline_new) { | 1525 if (!FLAG_inline_new) { |
| 1522 __ jmp(&call_builtin); | 1526 __ jmp(&call_builtin); |
| 1523 } | 1527 } |
| 1524 | 1528 |
| 1525 ExternalReference new_space_allocation_top = | 1529 ExternalReference new_space_allocation_top = |
| 1526 ExternalReference::new_space_allocation_top_address(); | 1530 ExternalReference::new_space_allocation_top_address(); |
| 1527 ExternalReference new_space_allocation_limit = | 1531 ExternalReference new_space_allocation_limit = |
| 1528 ExternalReference::new_space_allocation_limit_address(); | 1532 ExternalReference::new_space_allocation_limit_address(); |
| (...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3282 // Return the generated code. | 3286 // Return the generated code. |
| 3283 return GetCode(); | 3287 return GetCode(); |
| 3284 } | 3288 } |
| 3285 | 3289 |
| 3286 | 3290 |
| 3287 #undef __ | 3291 #undef __ |
| 3288 | 3292 |
| 3289 } } // namespace v8::internal | 3293 } } // namespace v8::internal |
| 3290 | 3294 |
| 3291 #endif // V8_TARGET_ARCH_IA32 | 3295 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |